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
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