AnsweredAssumed Answered

How to catch undo and redo in an add-in?

Question asked by Peter Brinkhuis on May 4, 2019
Latest reply on May 6, 2019 by Peter Brinkhuis

My add-in Drew lets users create drawings with the correct template, sheet format, views, tables and blocks in one click. Then users can add or remove views from our UI before they start adding dimensions and details manually.


Users can also manually delete views, tables and sheets. I was able to catch all of these using events.


Now comes the real problem, they can also undo any delete action. How can you find out what the undo action was? SolidWorks keeps an undo list, but I found no way to access it through the API.


Alin Vargatu once suggesting in another topic to keep a list of all actions by the user, but that seems like overengineering. Is there really no better way?