Cancel multiple methods with a single undo in SketchUp

Hello everyone, :sun_with_face:

Is there a way to cancel several methods with a single rollback in SketchUp?

The “start_operation” method in the example below needs 3 cancellations in SketchUp to cancel all!

I tried to wrap each method in a “start_operation”, but that does not change anything.

  mod = Sketchup.active_model
  mod.start_operation('methodes', true)

Your experience in rugby would be of great help to me.

Thank you in advance.


Giving us an example with bogus method names does not help. So I have to guess

There are certain methods in the API that commit their own operation and cannot easily be nested in a Ruby operation.

These cases have already be discussed here in the forum,
and logged as issue in the official public API Issue Tracker.

Notable methods are DefinitionList#load and Model#place_component.


Also, I had posted an example that uses Model#place_component in one undoable operation …

BTW, I have no real practical experience in rugby :rugby_football:,
although we had several classes of playing it in high school physical education.


I suspected it!
I will stop quibbling any details!
It’s not a big problem, so I’ll skip it.

Wooow I did not pay attention to what I wrote! :scream:
But all your tips for playing rugby will also be appreciated. :grin:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.