• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Delete hidden components

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
7 Posts 6 Posters 5.0k 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.
  • B Offline
    Burkhard
    last edited by 3 Dec 2012, 21:46

    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
    • F Offline
      focpt
      last edited by 3 Dec 2012, 21:57

      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
      • T Offline
        TIG Moderator
        last edited by 3 Dec 2012, 22:22

        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
        • T Offline
          thomthom
          last edited by 4 Dec 2012, 08:50

          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
          • G Offline
            Gaieus
            last edited by 4 Dec 2012, 09:09

            @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
            • B Offline
              Burkhard
              last edited by 4 Dec 2012, 10:06

              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 29 Oct 2018, 20:01

                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