How to clear undo/redo list in Grasshopper?


I’m trying to use a script Python/C# to clear the undo/redo list Grasshopper. I found this function, but I can’t get it to work:

I tried calling it directly, tried initializing a GH_UndoServer, but I’m still not doing it correctly as the undo history is still there. I felt that it should be super simple to do but I just can’t make it work, and can’t find any examples. Please help!

Have you tried using the undo server provided by the document? GH_Document.UndoServer Property

It worked! Thanks a lot!!

1 Like