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

    [Plugin] Modification to PutOnLayer

    Scheduled Pinned Locked Moved Plugins
    19 Posts 18 Posters 36.4k Views 18 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.
    • D Offline
      Dik Harrison
      last edited by Dik Harrison

      I tend to have way too many layers in my more complex models, and I really like Chris Grant's PutOnLayer as modified by Brian Wirth to put the geometry in Layer 0, but with so many layers, it is often difficult to locate the layer I'm looking for since the plugin lists them in ID order. I did a little tweak to the plugin to sort the layer list by name alphabetically. I hope someone else out there can make use of it.

      This is the tweaked plugin...

      P.S.
      I forgot to mention that you need to rename the file to PutOnLayer.rb when you put it into your plugins folder.

      Have fun...

      Dik

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

        thanks a lot, will come in handy
        👍

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

        1 Reply Last reply Reply Quote 0
        • jujuJ Offline
          juju
          last edited by

          Thanks!

          Save the Earth, it's the only planet with chocolate.

          1 Reply Last reply Reply Quote 0
          • Bob JamesB Offline
            Bob James
            last edited by

            Thank you, thank you, thank you.

            Would you believe that I was in the Ruby Forum about to ask if someone could do this very thing!!
            Many of my models are very large and have up to 50 layers or more. It was really a chore to first make the layer current and then click on an object and then use Put on Layer. This makes it so much easier.

            i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

            1 Reply Last reply Reply Quote 0
            • MALAISEM Offline
              MALAISE
              last edited by

              Really a good improvement. Mainly when using a lot of layers ( for teaching purpose )on drawings about sophisticated devices ( X ray Fluorescence spectrometers)

              Thanks a lot 👍 👍

              MALAISE 😄

              La Connaissance n'a de valeur que partagée

              1 Reply Last reply Reply Quote 0
              • JClementsJ Offline
                JClements
                last edited by

                Dick,

                I tried your version. It does a nice job of listing the layers in alphabetical order, BUT it seems to have broken the function of the original script which is to move ALL NESTED geometry to a target layer.

                Do you have a way to fix this?

                John | Illustrator | Beaverton, Oregon

                1 Reply Last reply Reply Quote 0
                • Bob JamesB Offline
                  Bob James
                  last edited by

                  Putting things on Layer(0) is nice, but how about putting things on a layer of choice rather than just Layer(0).

                  As I said in my Dec 2008 post, I thought this plugin used to do that: am I wrong? [Windows 7]

                  i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

                  1 Reply Last reply Reply Quote 0
                  • onzkiO Offline
                    onzki
                    last edited by

                    Thanks for the tweak, I'm about to request this one. I'm glad it's here already.😄


                    [/hr]Dell Alienware Area-51. SKU 2021 Pro. AutoCAD 2023. Landscape design firm

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      luo
                      last edited by

                      @jclements said:

                      Dick,

                      I tried your version. It does a nice job of listing the layers in alphabetical order, BUT it seems to have broken the function of the original script which is to move ALL NESTED geometry to a target layer.

                      Do you have a way to fix this?

                      i just added working layer list sorted by name.
                      try it, now it should work.
                      maybe someone could try to update layers list to display in coulumns?
                      without having to scroll up and down.


                      putonlayer layer list sort by name

                      1 Reply Last reply Reply Quote 0
                      • panixiaP Offline
                        panixia
                        last edited by

                        thank you a lot!!!!

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

                          wow thanks a lot! that's what I needed

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

                            Old post, but here is an update for those having difficulty. Use this script in conjunction with:

                            http://sketchucation.com/forums/viewtopic.php?t=7638

                            The two combined are brilliant! This is especially true for those that use proper layering techniques, but receive models from Revit Exports.

                            1 Reply Last reply Reply Quote 0
                            • H Offline
                              Helle
                              last edited by

                              SUPER ... Really LOVE it 😄

                              1 Reply Last reply Reply Quote 0
                              • 3dita3 Offline
                                3dita
                                last edited by

                                Hi there! This is a great plugin, but could there be an option to create a new layer, after I have selected a group, and right clicked on it?

                                It could be useful to right click > Put on Layer > New..

                                Is it possible?

                                3dita - Digital Visual Motion

                                1 Reply Last reply Reply Quote 0
                                • O Offline
                                  orbital
                                  last edited by

                                  This is a great plugin - thanks!

                                  But I don't want it to move all nested geometry (groups) to the target layer.

                                  e.g. I'll have a nest of, say, three groups - outer group on a wall layer, middle group on an exterior layer and the inner most group on an existing layer.

                                  I'm not experienced in the SketchUp API... In the code I've commented out the two lines of code where the the recursion happens and the plugin now seems to not move all nested geometry to the target layer, which is what I want to happen.

                                  Is this a correct assumption to make or have I corrupted the plugin despite it seeming to work?

                                  1 Reply Last reply Reply Quote 0
                                  • pbacotP Offline
                                    pbacot
                                    last edited by

                                    omit

                                    MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

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

                                      I would like to immensely thank all of you who dedicated themselves to making this amazing tool! Saved my life! God bless you!

                                      @luo said:

                                      @jclements said:

                                      Dick,

                                      I tried your version. It does a nice job of listing the layers in alphabetical order, BUT it seems to have broken the function of the original script which is to move ALL NESTED geometry to a target layer.

                                      Do you have a way to fix this?

                                      i just added working layer list sorted by name.
                                      try it, now it should work.
                                      maybe someone could try to update layers list to display in coulumns?
                                      without having to scroll up and down.

                                      1 Reply Last reply Reply Quote 0
                                      • P Offline
                                        pibuz
                                        last edited by

                                        @orbital said:

                                        This is a great plugin - thanks!

                                        But I don't want it to move all nested geometry (groups) to the target layer.

                                        e.g. I'll have a nest of, say, three groups - outer group on a wall layer, middle group on an exterior layer and the inner most group on an existing layer.

                                        I'm not experienced in the SketchUp API... In the code I've commented out the two lines of code where the the recursion happens and the plugin now seems to not move all nested geometry to the target layer, which is what I want to happen.

                                        Is this a correct assumption to make or have I corrupted the plugin despite it seeming to work?

                                        Hi orbital! seems like I sort of need the exact same thing you did!
                                        Is there any chance you could share the modified rb? Many many thanks in advance!

                                        WEB (ita) - https://filipposcarso.wixsite.com/ordinentropico

                                        1 Reply Last reply Reply Quote 0
                                        • gullfoG Offline
                                          gullfo
                                          last edited by

                                          the recursion commented out is what makes it work incorrectly. however, it seems like you want to perhaps identify the group or component tag at the parent level as to where the recursion on the child parts go? otherwise, you would need to open the top level group and apply each group or component separately. on the former - that's probably some coding to identify if the parent tag is something other than layer0 and use that tag to then recursively tag all children objects.
                                          there is a downside to that, because now all the children will be assigned tags which means to move the group or component all the recursion will have to happen again, versus having built the object(s) in layer0 and applying the tag to the parent (in which case the children will be shown or hidden when that tag is checked or unchecked).

                                          Glenn

                                          http://www.runnel.com

                                          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