|
Would you like to be able to delete any entity in your drawing by just double-clicking on it? Try this out : ;CODING STARTS HERE (vl-load-com) ;************** (prompt "\nDC-Delete loaded. Do NOT Run.....) (vlr-mouse-reactor "Delete Object" '((:vlr-beginDoubleClick . DC-Delete))) (defun DC-Delete (theReactor thePoint / ) (setq objectPoint (car thePoint)) (setq acadDocument (vla-get-activedocument (setq newsset (vla-add ssets "SS1")) (vla-selectAtPoint newsset (vlax-3D-point objectPoint)) (setq theObject (vla-item newsset 0)) (vla-delete theObject) (vla-delete (vla-item ssets "SS1")) (princ) );defun ;CODING ENDS HERE Copy and paste this into the Visual Lisp
Editor and save it as "DC-Delete.lsp". Can you see the potental for this type of
reactor? Double-click on a text object, |
|