Hello, I’m translating some curves using the Transform API. I’m can correctly translate curves but, after pressing CTRL+Z to undo the transformation, Rhino says “Nothing to undo”. Here is the code I’m using:
I even tried using TransformWithHistory (with History enabled of course) but it always says that there is nothing to undo. I’m probably missing something here, maybe translation isn’t the correct method in this case? Thanks in advance.
Are you doing this in the context of a command? If you are, the undo should work.
If you don’t do this in a command, use the following to start and finalize an undo record:
var id = doc.BeginUndoRecord("Start transformation");
// perform transformation
doc.EndUndoRecord(id);