Transaction/Undo/Redo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Navisworks Transactions are wonderful.
By using them to enclose multiple actions modifying the document, not only you gain an incredible speedup, but you also the user to Undo all of them at once.
Kuddos to Navisworks team for this and for supporting multi-level Undo/Redo.
This is a challenging thing to implement so again Kuddos for this (and yes I blame but I also compliment where due ;->)
Now my question:
While I cleanly encapsulate our plugin important action into a transaction, most of these also modify the plugin internal state.
Thus if user "Undo", we end up in inconsistent state.
As a workaround for now, for such operation that modify internal state, I also enclose it in a paired document StartDisableUndo/EndDisableUndo.
However ideally I would like to intercept the Undo/Redo to do our own stuff.
But I didn't find any dedicated event to attach to.
Any clue anyone?
Thanks.