Fast way to toggle visibility
-
I am looking for the fast possible way to toggle the visibility of a lot of individual groups or components. I am currently using Set (selection sets) to remember what objects need to be turned on and off, but it is still a little slow when I use the script below on a 100+ groups:
$set.each { | item | item.visible = true }
Any way to speed this process up? Or is this the only way?
Thanks,
NewGuy -
Assign them a Layer and toggle the Layer?
-
Are you using it within a
model.start_operationwith the second argument to true? (disable UI?) -
"model.start_operation"
That was it! Layers was my plan B. Thanks for the quick response.
-
Note that using the second argument only works with SU7+
I use this proxy method:
def self.start_operation(name) model = Sketchup.active_model if Sketchup.version.split('.')[0].to_i >= 7 model.start_operation(name, true) else model.start_operation(name) end end -
Good point.
Thanks
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