I am trying to undo the last operation when the user enters a new text value after calling a model.start_operation() and model.commit_operation() delimited method (in my case, a method called draw_arc).
I call Sketchup.send_action(“editUndo:”) and call my draw_arc again, but the send_action is an asynchronous call and is not actually performed until after my draw_arc is complete. The net effect is to undo the second call to draw_arc rather than undo the original operation and perform the second.
How can I force the Undo to happen first? Is there a synchronous call? This is like the difference between ‘PostMessage’ and ‘SendMessage’ in the windows API.