EndUndoMark Method

Back to Methods Reference

Marks the end of a block of operations.

Signature

VBA : object.EndUndoMark

VL : (vla-EndUndoMark object)

(vla-endundomark thisdrawing)

  • Object : Document
    The object or objects this method applies to.

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

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website