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

    Purge

    Scheduled Pinned Locked Moved Developers' Forum
    13 Posts 5 Posters 2.6k Views 5 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 Offline
      TIG Moderator
      last edited by

      @unknownuser said:

      I know there is a purge all unused ruby:
      http://www.crai.archi.fr/RubyLibraryDepot/Ruby/en_edi_page.htm

      I was wondering if there was a ruby for purging all layers, colors, components, etc... that are being used.

      If not, could it be written? Purge everything to default colors and 0 layer etc...

      This has been around for a while (v6 only)...


      PurgeAll.rb

      TIG

      1 Reply Last reply Reply Quote 0
      • boofredlayB Offline
        boofredlay
        last edited by

        TIG, that is the same one I posted a link to. I just replaced the one I had with the one you posted above and it did the exact same thing, purged anything that is being unused.

        This I knew about, what I am asking about is a script that will purge colors or layers etc... that are being used. I.E. delete the colors from a model and leave only the default.

        http://www.coroflot.com/boofredlay

        1 Reply Last reply Reply Quote 0
        • T Offline
          todd burch
          last edited by

          There is a RemoveMaterials at http://www.smustard.com/script/RemoveMaterials that will remove all materials in use in the model. I suspect there is a collapse everything to layer0 script around somewhere too - maybe on Didier's site. I don't remember seeing a script for removing all styles though. I wrote a PurgeManager back during the V6 beta, but never released it. It uses WebDialogs, has buttons, gives you a before and after image of the counts (before and after purge), and is generally pretty neat. But, I then went on to add the File Size specification, and ran into cross platform issues that turned into bug reports and feature requests, and there it sits - never released.

          Todd

          1 Reply Last reply Reply Quote 0
          • T Offline
            tomsdesk
            last edited by

            Boo, what am I missing (again :`) I use the "purge unused" in the statistics section of the model info menu...?

            http://www.tomsdesk.moonfruit.com/
            2.5D Trees & Shrubs!

            1 Reply Last reply Reply Quote 0
            • boofredlayB Offline
              boofredlay
              last edited by

              Thanks Todd, that is what I was searching for. I will try to find the collapse to layer 0 you mentioned.

              Tom, I was looking for a Purge Used script, not Unused πŸ˜‰
              And the PurgeAll script that TIG attached will purge all unused components, layers, materials, and styles then generate a report. I guess the only difference between the purge unused in the statisitcs and the script is the generated report, correct me guys if I am wrong.

              http://www.coroflot.com/boofredlay

              1 Reply Last reply Reply Quote 0
              • T Offline
                tomsdesk
                last edited by

                Oops...in the wrong forum for skimming, sorry.

                http://www.tomsdesk.moonfruit.com/
                2.5D Trees & Shrubs!

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

                  Is there something similar to RemoveMaterials, which would also delete the materials from the paint bucket (in model- pull down menu)?

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

                    @unknownuser said:

                    Thanks Todd, that is what I was searching for. I will try to find the collapse to layer 0 you mentioned.

                    Tom, I was looking for a Purge Used script, not Unused πŸ˜‰
                    And the PurgeAll script that TIG attached will purge all unused components, layers, materials, and styles then generate a report. I guess the only difference between the purge unused in the statisitcs and the script is the generated report, correct me guys if I am wrong.

                    My Purge All script lets you choose NOT to purge some types e.g. Layers can be left alone whilst everything else is cleaned up...

                    TIG

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

                      @miikka1978 said:

                      Is there something similar to RemoveMaterials, which would also delete the materials from the paint bucket (in model- pull down menu)?

                      My Purge All could be used (cannibalised) to purge unused materials after they are no longer used when RemoveMaterials has been run...

                      TIG

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

                        This is a 'Default All Layers' (in selection) script that I've just cobbled together. Please try and report back...


                        default_all_layers.rb

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • boofredlayB Offline
                          boofredlay
                          last edited by

                          TIG, that is great. Works like a charm. Just run it, then run purgeall and poof.

                          Thanks.

                          http://www.coroflot.com/boofredlay

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

                            @unknownuser said:

                            TIG, that is great. Works like a charm. Just run it, then run purgeall and poof.

                            Thanks.

                            At least that works ! Now for Roof.rb glitches. Perhaps you should all go to church and retry it ?

                            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