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.

PutOnLayer_bmw_wrh.rb

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

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.

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.

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.

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?