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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Remove all instances of a component?

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    13 Posts 6 Posters 3.6k Views 6 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.
    • TIGT Online
      TIG Moderator
      last edited by

      This should remove all of the instances of a component named 'RivetName'
      Sketchup.active_model.definitions["RivetName"].instances.each{|e|e.erase!}
      Just add the actual name of the Component you want to erase!
      Then purge-unused components later as desired...

      If your 'Rivet' is too complex... BUT you'd like to retain it in some much simpler form... then edit an instance and make it much simpler and being a component all instances will change to match...
      πŸ˜•

      TIG

      1 Reply Last reply Reply Quote 0
      • GaieusG Offline
        Gaieus
        last edited by

        You can also always right click on a component thumbnail in the component browser > In model and delete it. TIG cannot think out of ruby any more. πŸ˜’

        Gai...

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

          Csaba !
          😳 that is very true!
          BUT my edit and simplify ideas does still stand πŸ˜•

          TIG

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            Ah sure. Also, if these things are inside other components, editing one of those and deleting would delete all instances, too.

            Gai...

            1 Reply Last reply Reply Quote 0
            • C Offline
              CalypsoArt
              last edited by

              Thanks gentlemen. I actually thought about the delete from the component browser but thought that would be too easy and it would probably be more complicated than that. Also since I'm not that organized with my components, I can see the script coming in handy also.

              1 Reply Last reply Reply Quote 0
              • gillesG Offline
                gilles
                last edited by

                When you right-click on a selected component , in the context menu choose "instances", "select all".

                Edit: I thing this comes with TT selection toys
                http://forums.sketchucation.com/viewtopic.php?t=14975#p114380

                " c'est curieux chez les marins ce besoin de faire des phrases "

                1 Reply Last reply Reply Quote 0
                • GaieusG Offline
                  Gaieus
                  last edited by

                  Yes, that's a plugin. Sometimes I also forget what is native SU and what is a plugin. πŸ˜„

                  (Great plugin BTW).

                  Gai...

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    david.
                    last edited by

                    @gilles said:

                    When you right-click on a selected component , in the context menu choose "instances", "select all".

                    Edit: I thing this comes with TT selection toys
                    http://forums.sketchucation.com/viewtopic.php?t=14975#p114380

                    Not quite. A plugin isn't required. If it's not already open, just open the Components window (Window->Components). Select the "In Model" components. Right-click on the desired component and choose "Select Instances". Then, press the Delete key.

                    1 Reply Last reply Reply Quote 0
                    • GaieusG Offline
                      Gaieus
                      last edited by

                      That's what I also mentioned above:
                      http://forums.sketchucation.com/viewtopic.php?p=368127#p368127

                      However that context menu item gilles mentioned comes with the plugin.

                      Gai...

                      1 Reply Last reply Reply Quote 0
                      • gillesG Offline
                        gilles
                        last edited by

                        @unknownuser said:

                        Not quite. A plugin isn't required. If it's not already open, just open the Components window (Window->Components). Select the "In Model" components. Right-click on the desired component and choose "Select Instances". Then, press the Delete key.

                        Well that true I tried it but it does not select nested components, TT selection tool does.

                        " c'est curieux chez les marins ce besoin de faire des phrases "

                        1 Reply Last reply Reply Quote 0
                        • GaieusG Offline
                          Gaieus
                          last edited by

                          That's true. You can even play around with it. Select a bunch of nested (and mirrored and scaled) instances and start rotating or moving them. Really funny. πŸ˜„

                          Gai...

                          1 Reply Last reply Reply Quote 0
                          • B Offline
                            bjornkn
                            last edited by

                            @calypsoart said:

                            I'm working on a project that has a lot of metal and truss work. I may have put in too much detail, and the model is bogging down my machine. I'd like to reduce the load. I was wondering if there is some way to remove all instances of a component. E.g I put in rivets for the joints in the steelwork. In reality, these are invisible for most views unless zoomed way in. I could remove these rivets/components and it would not be noticed. Is there a plugin that might remove or allow me to swap out a complex component for a simpler one?

                            Component swapping is built-in - no need for a plugin.
                            Select the component and right-click. Select Save As... from the menu and save it a place where you'll find it (like where your scene is?).
                            Then you could "rebuild" your rivet to a single line (that could even be invisible), or some simple shape.
                            If/when you later find out that you need the rivets again, you just select one of the stand-ins, right-click and Reload... it. But before you do, save your simple rivet as Rivet_simple or something, so it is easy to get it back later.
                            Very convenient when building complex scenes - like with hundreds of 3D trees, cars, rivets or similar..
                            Just model very simple components and Reload more complex versions later when needed.

                            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