I recently ran into a problem where undo-like behavior while running a script would be very helpful. For any string or number values, implementing my own undo inside the script is not a big problem, but when it comes to geometry changes, especially modifying geometry, it is much harder or impractical to do. For example, I have a solid that I interactively add holes to within the script runtime. Being able to undo each hole would be great, but now in order to do it I would need to somehow store each geometry piece in some tricky way (temp export, hide somehow etc.)
In general I like the current state that the entire RhinoScript runtime is a single Undo stack step. But wondering if there could be a method to force record Undo during script runtime (and actually run Undo while in the script). Or maybe there is a better way to do it? Would you have any suggestions ?