mstb Posted October 14, 2022 Share Posted October 14, 2022 Hello everybody ;; Start Undo - Lee Mac ;; Opens an Undo Group. (defun LM:startundo ( doc ) (LM:endundo doc) (vla-startundomark doc) ) ;; End Undo - Lee Mac ;; Closes an Undo Group. (defun LM:endundo ( doc ) (while (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark doc) ) ) ;; Active Document - Lee Mac ;; Returns the VLA Active Document Object (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) ) Could you please advise what is the advantage of the above code compared to the below (setq doc (vla-get-activedocument (vlax-get-acad-object))) (vla-startundomark doc) (vla-endundomark doc) I apologize if my question is simple. Thanks all. Quote Link to comment Share on other sites More sharing options...
Jonathan Handojo Posted October 15, 2022 Share Posted October 15, 2022 (edited) I'm not too sure myself actually. starting an undo mark in itself automatically ends the previous marker. Edited October 15, 2022 by Jonathan Handojo Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 15, 2022 Share Posted October 15, 2022 I explain the difference in my post here: http://www.theswamp.org/index.php?topic=44700.msg499322#msg499322 2 Quote Link to comment Share on other sites More sharing options...
mstb Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) 13 hours ago, Lee Mac said: I explain the difference in my post here: http://www.theswamp.org/index.php?topic=44700.msg499322#msg499322 Wow excellent, you'r best. Edited October 16, 2022 by mstb Quote Link to comment Share on other sites More sharing options...
mstb Posted October 16, 2022 Author Share Posted October 16, 2022 13 hours ago, Lee Mac said: I explain the difference in my post here: http://www.theswamp.org/index.php?topic=44700.msg499322#msg499322 Wow excellent, you'r best. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.