Command_UndoRedo and Grasshopper actions

I added a EventWatcher for Undo/Redo Rhino Events to sync some data when Rhino doc is modified, but tt GH seems to call BeginRecord, EndRecord, and PurgeRecord to delete the record on each GH action

If a DocObject is added 2 steps are recorded and purged :

If a slider is dragged the event is thrown hundred of times:

Only when an object is baked it doesn’t perform the Purge of this record so the record it’s permanently stored…, the problem is I have to store some the data on EndRecord, and it’s painfull to store it thousands times and delete that data after that…

Only when the Solver Undo is Unchecked it doesn’t throw any event

It could be possible @DavidRutten change it to avoid BeginRecord -> EndRecord -> PurgeRecord to don’t throw any event except if an object is added to Rh doc?

I don’t think the Rhino SDK allows for that, which is why I have to do this horrible hack in the first place. I can ask around if we can tune this up, but for the foreseeable future unchecking that option is your only solution.

Ok, I’ll use delayed event system to register the undo steps if not purged.
Thank you anyway for the answer.

Kind Regards