Disabling and re-enabling AutoCAD commands?

Disabling and re-enabling AutoCAD commands?

Anonymous
Not applicable
315 Views
1 Reply
Message 1 of 2

Disabling and re-enabling AutoCAD commands?

Anonymous
Not applicable
Within a single session of AutoCAD is there a way to at any point (other
than when autocad is loading) to disable commands, and then a way to enable
commands?

Some commands by the user could corrupt my dictionaries if done at
particular times. I'd like to turn off "u" (undo shortcut for single undo),
while my app is running, and only allow the full "undo Back" (to mark). IE.
if one of my custom entities is undone, i want the appropriate dictionary
entries and sub entities deleted as well.

even better can I totally disable undo while my app is loaded, but still
allow my app to call an "undo mark" and "undo back"? IE. they would hit an
Undo button on my form, instead of from autocad prompt or toolbar. My app
needs some housecleaning when an undo is called.

Mike
0 Likes
316 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
If you look in the lisp help guide at the area where it is taking about C:XXX functions, you will see that there is an autocad UNDEFINE command which you should be able to call using the SendCommand method. There is also a corresponding REDEFINE command as well.
0 Likes