Originally Posted by
mweaver
I've tried it both ways. The code I posted includes both undo mark and undo end. It crashes. When I took all references to the undo facility out of my code it still crashes. I also have a VBA routine exibiting the same behavior.
If it crashes without the undo stuff then it is the code. I know that if you don't end an undo, and try to undo past it, it will sometimes crash Acad. I usually end any open undo, then start my own undo, and then end it at the end, in case something has left an undo open.
Code:
(command "_.undo" "_end")
(command "_.undo" "_group")
.. code here
(command "_.undo" "_end")
or where ActDoc = Active Document
Code:
(vla-EndUndoMark ActDoc)
(vla-StartUndoMark ActDoc)
.. code here
(vla-EndUndoMark ActDoc)