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