sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Delete hidden components

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    7 Posts 6 Posters 5.0k 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.
    • BurkhardB Offline
      Burkhard
      last edited by

      I was asked how to delete a bunch of hidden components.
      The workarounds I can imagine are to select the Model and copy it into a new Sketchup instance without the hidden Geometrie or to make a Group of the Object and unhide the rest to select and delete.

      But if the model is around 100MB and I talk about 50000 Components, it took a lot of time.

      Any Idea for a more elegant solution, maybe with a plugin?

      [http://www.ia-plus.de(http://www.ia-plus.de)]

      1 Reply Last reply Reply Quote 0
      • focptF Offline
        focpt
        last edited by

        Try the Outliner tool in SU (Window > Outliner). Any group that hidden will be in italics. You can select multiple items and delete from this list.

        • Nathan
          http://www.focalpointstudio.net

        SU8, VRay 1.49

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

          If you want to erase ALL hidden component-instances/groups/images used in the model then this one-liner copy/pasted into the Ruby Console + <enter> will do it: it's one step udoable

          m=Sketchup.active_model;m.start_operation('x');m.definitions.each{|d|d.instances.each{|i|i.erase! if i.hidden?}};m.commit_operation
          

          you can limit it to just component-instances with this version...

          m=Sketchup.active_model;m.start_operation('x');m.definitions.each{|d|next if d.group? || d.image?;d.instances.each{|i|i.erase! if i.hidden?}};m.commit_operation
          

          If you want to erase other hidden stuff like geometry then it's more complex...

          TIG

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            My CleanUp plugin has a Erase Hidden Geometry function. anything that isn't visible when you run it is erased. (It off course ensures not to erase hidden edges that make up a visible face - or acting as the cutout profile for a cutout component.)

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

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

              @burkhard said:

              I was asked how to delete a bunch of hidden components.
              The workarounds I can imagine are to select the Model and copy it into a new Sketchup instance without the hidden Geometrie or to make a Group of the Object and unhide the rest to select and delete.

              This may not be a good method because if there are nested and at the same time hidden groups/components in top level groups/components that you are copying, it will take those to the new model, too.

              Gai...

              1 Reply Last reply Reply Quote 0
              • BurkhardB Offline
                Burkhard
                last edited by

                Thanks to all... πŸ‘

                [http://www.ia-plus.de(http://www.ia-plus.de)]

                1 Reply Last reply Reply Quote 0
                • M Offline
                  monkers
                  last edited by

                  Hi Guys, I'm trying to do similar.

                  Is there a way to write a script that could delete all items that get called in outliner per search term. I am trying to clean up a model for rendering provided by a client. The file has every bathroom, sink, door, light, etc for thousands of apartments. Unless I explode everything I have to delete by each level I have managed to separate everything into.

                  Currently I have to go through each definition X each building X each level. Each time I select and delete it takes like 5 minutes. I have already spent a day doing this. It's getting really tedious. 😍


                  Capture.JPG

                  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