sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Search & Replace Name

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 4 Posters 317 Views 4 Watching
    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.
    • A Offline
      alz
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        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.

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • A Offline
          alz
          last edited by

          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.

          😄

          1 Reply Last reply Reply Quote 0
          • R Offline
            remus
            last edited by

            So you did 👊

            http://remusrendering.wordpress.com/

            1 Reply Last reply Reply Quote 0
            • A Offline
              azuby
              last edited by

              Are you familiar with regular expressions?

              azuby

              *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

              Bad English? PM me, correct me. :smile:**

              1 Reply Last reply Reply Quote 0
              • TIGT Offline
                TIG Moderator
                last edited by

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

                TIG

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

                Advertisement