Search & Replace Name
-
Has anyone come across a Search & Replace plugin for component/group names?
I've got a scene with dozens of objects that need to shift from one # to another # -- it's a real bear going in and doing it manually for all the objects.
-
Im not sure if it's what your looking for, but if you go to the components window and right click a component there is a 'select instances' (find) option and a 'replace selected' (replace) option.
-
Yeah, I knew about how to replace physical components -- I was looking for a way to rename components. So if I have MyComponent_AB YourComponent_AB in the Outliner, I could rename the _AB to _YZ. Now they'd be called MyComponent_YZ and YourComponent_YZ.

-
So you did

-
Are you familiar with regular expressions?
azuby
-
Open the Outliner and Entity-Info windows and dock them together.
Select the Component Instance in question in the Outliner and its Definition-Name AND Instance-Name appear in the Entity-Info window.
Edit these as desired.
Changing the Definition-Name will globally rename the Definition. Each Instance can have its own name too...
However, if you want to replace parts of names within a set of several definitions' names [like "AB" with "XY"], then to do this globally you need something this:### this does all definitions' AND instances' names; edit 'text_go=/text_in=' to suit... text_go="AB";text_in="XY";Sketchup.active_model.definitions.each{|defn|defn.name=defn.name.gsub(text_go,text_in);defn.instances.each{|inst|inst.name=inst.name.gsub(text_go,text_in)}} ### remove the defn.name... part to leave them alone OR remove the defn.instances... part to leave them alone...I'll leave you to make the app/menu etc...
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