Quickly rename layers on several components
-
I created several dozen components at my last job. The employer had a very specific standard for layer names. Now I am working at a different company which has a different standard for layer names. I still have the components from the last job. Is there a way to quickly rename the layers according to the current company's standard? Perhaps a batch utility or rubyscript?
Thanks-
-
Well, what you could easily do is to import all your components (they would probably share common layers), rename these layers and just save all components again.
Certainly a plugin would be best - don't know if one exists but I move the topic to the plugins forum and let's see what the gurus find out
-
That seemed to work. However when I save it back to the original file location on the network, Sketchup tacks on an underscore and a number at the end of the file name so I have to override this. In the layers box, I can create a new layer in the new sketchup file, delete the old layers (from the imported components) that I don't want and it will merge those items onto the new layer.
However, I came across a few other issues. Is there a rubyscript or batch file to quickly change the definition on components? Do I have to do this manually? When I import several components into one sketchup file, the library shows the old definition names even after I rename them. Even if I reimport the components into a differetnt sketchup file, the definition name in the library is still the older name, even though the entity info for the individual component shows the revised name. Any ideas?
Thanks-
-
Did you ever program anything in any language?
You'll need a list of old names and new names. In Ruby array notation (enclose the array with
[
and]
, enclose the names in quotes and separate array members with commas, like this:list = [ ["first_old_name", "replacement_for_it"], ["next_old_name", "next_replacement_name"], ... ]
Create such a list and you are about 90% done with the project. I, or one of the smart people who inhabit this forum, will help you with the other 10%.
-
@gaieus said:
Certainly a plugin would be best
Gaieus, you do know that my "how to Ruby" section of the tutorial is well underway, don't you? No programming experience required:
http://www.MartinRinehart.com/models/tutorial/tutorial_11.html
Advertisement