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
Name a Group after its Layer
-
Hi,
Is it possible to automatically name a group (or a component) after the layer it is on?
I understand this should be possible with a fairly simple ruby script. Has anyone come across one?
Any help would be greatly appreciated.
Ross
-
ross, like bmike, all you need is a single statement entered into the Ruby Console.
Sketchup.active_model.entities.each{|e| e.name=e.layer.name if e.is_a?(Sketchup;;ComponentInstance) || e.is_a?(Sketchup;;Group)}This will give any component instance or group the name of the layer it is on.
-
Thanks Sam
That works a treat. Your help is much appreciated.
Ross
Advertisement