Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
π« Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
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
Advertisement