3dwannab Posted January 31, 2022 Share Posted January 31, 2022 (edited) I've looked up many threads on this but I was wondering if this is a good approach? I have an error handler like this: (defun *error* (errmsg) (and acDoc (vla-EndUndoMark acDoc)) (and errmsg (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " errmsg " >>\n")) ) (if undoTempObjsBool (command-s "._undo" "" "") ) ) Then in the code that I want to check if there's an undo while I draw some temp objects so that if the undoTempObjs variable is T then the undo action will work. This works but I was wondering if there was a better way of handling this or am I on the right track? (progn (setq undoTempObjsBool T) ;; Do some stuff here and afterwards set the undoTempObjsBool to nil (setq undoTempObjsBool nil) ) Edited January 31, 2022 by 3dwannab 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.