I've looked around the Microsoft website but unfortunately I cannot find any detailed information about the inner workings of the Visio undo/redo system. Any tips about where to find it appreciated!
Why is this important?
To keep data on the VSTO add-in side and in a Visio diagram in sync I use the UniqueIDs (GUIDs) just in case users move stuff around from page to page in Visio and changes the regular ID's.
When I use the Shape.Unique property with this setting:
visGetOrMakeGUID 1 Returns the unique ID string of the shape. If the shape does not yet have a unique ID, it assigns one to the shape and returns the new ID.
I set the GUID on any shape that doesn't already have one, and keep track of those GUID's in the VSTO add-in.
Now this is why understanding Undo/Redo is important.
If undo/redo stores the command but not the exact data of the change that occurred, the GUID might change when undoing/redoing!
I tested it and as far as I can see, Visio stores the exact data of the change that has occurred (thus no chance of GUID's changing between undo/redos). If anyone can confirm they also observe this behavior I appreciate it! Always worried I'm overlooking something.
It would be nice to be sure of this as well as knowing for sure this works the same going back until Visio 2010, but of course that requires Microsoft to document this well somewhere for us to find, which hopefully they did and I just overlooked.
Thank you for your insights on the undo/redo system!