Marks the end of a
block of operations.
Signature
VBA :
object.EndUndoMark
VL : (vla-EndUndoMark
object)
(vla-endundomark
thisdrawing)
Remarks
This method allows
AutoCAD to close the environment so operations from StartUndoMark to
EndUndoMark can be treated as a group of operations.
Example :
(defun c:al-undomark ()
;This example creates a series of lines, each one with an undo marker
;defined for it. After lines are created you can switch to AutoCAD
and type the Undo command, and only one line at a time will be undone.
;If StartUndoMark call is not made, an undo in AutoCAD will undo
;all the lines at once.
(vl-load-com)
(setq thisdrawing (vla-get-activedocument
(vlax-get-acad-object)))
(setq mspace (vla-get-modelspace thisdrawing))
(repeat 3
(setq pt1 (getpoint "\nSpecify First Point: "))
(setq pt2 (getpoint "\nSpecify Second Point: " pt1))
(vla-startundomark thisdrawing)
(setq myline (vla-addline mspace
(vlax-3d-point pt1)(vlax-3d-point pt2)))
(vla-endundomark thisdrawing)
);repeat
(princ)
);defun
|
|