Operations not commited
-
Hi all,
I got a problem with committing an operation inside a sketchup plugin. To reproduce:
` model = Sketchup.active_model
model.start_operation 'updateName'
@some_component.name="newName"
model.commit_operationmodel.start_operation 'hide_all_except'
@some_component.instances[0].hidden = true
model.abort_operation`Both operations are aborted.
It is a simplification, there are more operations but none of them are model.*_operation related.
What I am doing wrong? -
(1) It's easy to see why the 2nd op is aborted because you call
model.abort_operationinstead of committing it.(2) Perhaps some other plugin is also creating ops and "gluing" their's transparently between your 2 ops ??
- I always disable all other 3rd party plugins when developing!* (But I leave the OEM Dynamic Components extension ON.)
(3) Do yourself and us a big favor.. wrap your operations and trap any errors that cause the ops to abort.

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement