Selecting Groups by Name
-
Is there an easy way to select all groups that have the same name?
I have imported a large model from Tekla, it has not created separate layers but it has grouped each assembly. One group for each column etc. I want to texture all the steel, concrete, asphalt etc differently but this would be a very time consuming processes unless I can easily select all groups with the same name. Unless there is another way?

Cheers,
James
-
@jamesn320 said:
Is there an easy way to select all groups that have the same name?
I have imported a large model from Tekla, it has not created separate layers but it has grouped each assembly. One group for each column etc. I want to texture all the steel, concrete, asphalt etc differently but this would be a very time consuming processes unless I can easily select all groups with the same name. Unless there is another way?

Cheers,
James
Your example is a component instance so I assume that is what is to be selected rather than groups.
The following code can be pasted into the Ruby Console and executed to select Component instances by name
mod = Sketchup.active_model ent = mod.active_entities sel = mod.selection cin = ent.grep(Sketchup;;ComponentInstance).map{|ci|ci.name}.uniq.sort ipb = UI.inputbox(["Name to Select;"],[cin[0]],[cin.join("|")],"Select by Name") if ipb sel.clear ent.grep(Sketchup;;ComponentInstance).each{|ci| sel.add ci if ci.name==ipb[0] } end -
Wow! Thanks. That is exactly what I wanted. I have never used the Ruby Console before. Your code even adds the different groups names to the drop down menu.
Thank you very much!
James
-
I feel like I am about to go on a steep learning curve, is it possible to add that script into a button on the tool bar?
Cheers,
James
-
I've got it to now be on the drop down menu, Happy days.

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