I am looking into the AIUndoSuite for creating an undo point.
Actually I've created a plugin for Ai CC 2014 in which I have some set of functions which create some pageItems on the active artboard on a menu click.
And when I undo using cntrl-z it will undo some part of the functionality. I've to undo it several times to reset the active artboard to its original view.
What I am looking here is that may be there is any way to undo all the functionality (changes done because of plugin) in one go?
#1: There is an artboard with some pageItems on it. (Original view)
#2: Now plugin add some pageItems to the artboard on menu click. (Modified view)
Now when I undo (using cntrl-z), It will go from step #2 to step #1 in just one undo. I hope it make sense..
Any help will be highly appreciated..
Have you tried calling AIUndoSuite::SetKind(kAIAppendUndoContext) when the user clicks the menu but before you make any changes?