Using the input point manager (point monitor) allows you to monitor the mouse movement process and do what you want to do through callback functions, such as dynamic dragging, displaying tooltip strings, etc.
===============
Demonstrates the method of displaying memory entities during dynamic dragging
Using ARX's ViewportDraw, the screen refreshes to display entities, which is fast
CALL BACK FUNC:
While the mouse is moving, call CALLBACK continuously to set the FIT of SPLINE.
;;dynpt,The current WCS point coordinates of the mouse
;|
SPL variables, in-memory SPLINE entities, are not generated to the database, so manipulating it is faster because it does not require the extra burden of displaying it on the screen
|;
(xdrx-setpropertyvalue
spl
"setfitpoints"
)
(xdrx
-grdraw 1 -1 spl
) ;;Display memory entities )
(xdrx-setpropertyvalue
spl
"setfitpoints"
)
(xdrx
-grdraw 1 -1 spl
) ;;Display memory entities )
)
(progn (xdrx
-pointmonitor
"_callback") (setq spl
(xdrx
-spline
-make
)) ;|
Create memory DB entity
No APPEND to the database, no additional overhead such as WORLD DRAW, etc., and the operation speed is faster
|;
)
(xdrx-pointmonitor)
(xdrx
-setpropertyvalue spl
"removefitpointat" (length lst
));;Remove the last fitting point before the last mouse confirmation (xdrx-entity-make spl);;Create from memory entity to database
)
)
)
=============
The above LISP code uses the XDRX-API, which can be downloaded from
https://github.com/xdcad/XDrx-API and is updated at any time.
The XDRX API encapsulates AcDb, AcEd, AcGe, AcBr... C++ library, using C++ methods to develop LISP programs.Thousands of Lisp functions are available.
Modify message