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

[Plugin] Modification to PutOnLayer

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

    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
    • B Offline
      Burkhard
      last edited by 7 Sept 2008, 14:31

      thanks a lot, will come in handy
      ๐Ÿ‘

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

      1 Reply Last reply Reply Quote 0
      • J Offline
        juju
        last edited by 7 Sept 2008, 14:41

        Thanks!

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

        1 Reply Last reply Reply Quote 0
        • B Offline
          Bob James
          last edited by 10 Dec 2008, 07:43

          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
          • M Offline
            MALAISE
            last edited by 10 Dec 2008, 18:33

            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
            • J Offline
              JClements
              last edited by 2 Nov 2009, 20:25

              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
              • B Offline
                Bob James
                last edited by 3 Nov 2009, 05:14

                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
                • O Offline
                  onzki
                  last edited by 18 Nov 2011, 16:18

                  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 20 Apr 2012, 20:30

                    @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
                    • P Online
                      panixia
                      last edited by 9 Mar 2013, 13:55

                      thank you a lot!!!!

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        dungkedi
                        last edited by 18 Apr 2013, 12:53

                        wow thanks a lot! that's what I needed

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          asterios_polyp
                          last edited by 22 Oct 2013, 02:18

                          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 16 Mar 2014, 09:27

                            SUPER ... Really LOVE it ๐Ÿ˜„

                            1 Reply Last reply Reply Quote 0
                            • 3dita3 Offline
                              3dita
                              last edited by 22 Sept 2014, 10:49

                              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 31 Jul 2019, 22:48

                                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 1 Aug 2019, 01:35

                                  omit

                                  MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD

                                  1 Reply Last reply Reply Quote 0
                                  • R Offline
                                    rothacorp
                                    last edited by 15 Jun 2021, 16:20

                                    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 13 Aug 2021, 06:46

                                      @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 13 Aug 2021, 14:26

                                        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