Undo/Redo behaviour similar to transactions

I am currently facing the problem that I want to undo operations in a way that is similar to transactions. E.g. saving a point in time and then doing operations via COM/.Net and potentially undoing all operations until the saved point in time.

I thought of 3 possible solutions:

  1. Using Built-In transactions from BricsCAD ("AcadDocument.AbortTransaction"). The problem is that only after the transaction is completed the display gets updated, e.g. newly placed objects are not drawn.

  2. Manually programming an Undo/Redo-stack. This however fails when I want to undo delete operations, as I was not able to re-add an object once it was deleted. Adding the object again will yield a different handle which will have side effects down the line.

  3. Using the Undo/Redo Operations of BricksCAD. However those will track all changes made to the document and not only the changes I perform via code.

Do you have any suggestions how to implement my problem?

Thanks!
Eike Stein

Comments

This discussion has been closed.