• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Quickly rename layers on several components

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 3 Posters 1.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    nrschmid
    last edited by 24 Jan 2010, 23:47

    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-

    1 Reply Last reply Reply Quote 0
    • G Offline
      Gaieus
      last edited by 24 Jan 2010, 23:58

      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

      Gai...

      1 Reply Last reply Reply Quote 0
      • N Offline
        nrschmid
        last edited by 28 Jan 2010, 16:58

        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-

        1 Reply Last reply Reply Quote 0
        • M Offline
          MartinRinehart
          last edited by 28 Jan 2010, 17:52

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

          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

          1 Reply Last reply Reply Quote 0
          • M Offline
            MartinRinehart
            last edited by 28 Jan 2010, 19:33

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

            Link Preview Image
            Martinrinehart.com

            favicon

            (www.martinrinehart.com)

            Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement