Printing out a complete listing of layers in a drawing

Hello: I am using SketchUp Pro 2016 to simulate a construction progression of steps to build a complex foundation.
I need to print out a list of layers that I have created in the drawing so that I can initialize the file to produce scenes.
There are over 350 layers in the drawing, but when I Generate a report to list them, I only get 178. I am at a loss as to how to get the complete listing.
Any help would be appreciated.

You have over 350 layers in your SketchUp model? It leads me to believe that you are not aware of how the SU layer system works and you have been using the layers incorrectly. I hope someone else will chime in here and clarify the use of layers. I you do fully understand SUs layer system, then I apologize for this post, but 350 seems like too many, even for a complex foundation. Just my thoughts.

Can you provide some additional information? What OS are you using? Can you share the model with us? If you can’t share the model via forums, can you post it to 3D warehouse or to a dropbox? If you can’t do that, can you share some screenshots?

I agree with pault728: 350 layers seems an incredible and unmanageable number. Is it the result of using a template or importing a model? Is there something on each level? If not, and you have done a purge (perhaps without realising), it would have deleted the unused (empty) layers.

The default layer manager in SU is quite basic, without any nesting capabilities. You can get extensions that help with that (perhaps you have already).

I am not aware of any inbuilt routine that allows you to print out a list layer.

How are you generating this report?

Run this snippet in the Ruby Console and it will output a list of the layer names in the console

Sketchup.active_model.layers.each {|layer| puts}


Thank you for the responses!
For those of you that asked for a copy of the model, please have a look at the enclosed file in the attached link. Please note that this one is not the most recent file and does not have the full number of layers as to get to 350 we took each of the major green walls and divided each one into 9 parts to give the reviewing agency the granularity into the construction process.

Please review the scenes to see how I wish the model to mirror the construction cycle. The fundamental model was drawn in Revit and saved in a DWG format that I imported into SketchUp. I eliminated the high rise building that sat on top of this foundation system.

I am an intermediate level user in SketchUp so please do not hesitate to give feedback on my use of layers, etc.

I am using WIndows 10 on a SurfaceBook.

I attempted to extract the layer names by going to the File-> Generate Report -> Create a New Report, and selected only the Layers Attribute with the Entire Model box selected. This only gave me 2/3 of the actual layers in the model.

I appreciate the Ruby Script snippet but that suggestion is far and away above my knowledge base of how to perform, that function.

Thank you all for taking your time to help me out.!13283&authkey=!AFrYtMiTebVW2Jo&ithint=folder%2Cskp

As suspected, you are using layers “■■■■ about face” - a.k.a. in complete contradiction to their intended purpose !
You have some faces on their own layers and some ‘containers’ on Layer0 with their geometry on other layers…

ALL raw geometry should be made on Layer0, it should then be put into a ‘container’ [Group or Component] and a specific layer assigned to that ‘container’…

The layers in SketchUp are designed to control visibility, they do NOT separate geometry, so having different geometry on different layers which might be on/off will lead to madness and unexpected consequences - deleting an edge on a visible layer could delete the associated face on a hidden layer ! - which is only realized when its layer is turned back-on.

The Ruby snippet that was given earlier is simply copy+pasted into the Ruby Console +[enter] and it prints a list of all available layer-names.

However, you have far more pressing issues - learning to model raw geometry on Layer0 and then place grouped/componentized sets of that geometry on their own layers, AND use those to control the visibility.
If you have used CAD before, forget its layers’ protocols, and learn SketchUp’s !

1 Like

First, this old dog tried out the snippet and learned a new trick. It functioned as advertised - I have a list of all layers.

Second, I am going to have to think about how to recover from where I currently find myself. As this model was an import from Revit, I tried to use what I had been provided. The fundamental layering was imported along with the model.

If SketchUp is all about creating geometry in Layer0 and then put into a different “visibility bucket” (my words), I am not sure that this is going to work for my purposes… Seems to me to be a daunting task to move all of the geometry to Layer0 and then selecting the geometry I want to put into different “visibility buckets”. Is this the most reasonable approach, even though very time-intensive?

Thanks for the help.

you can also use ruby to move all geometry to Layer0 and make all the Scenes using the Layer names…

TIG has an extension that will move the geometry…

there’s also a Layer to Scenes one around… [maybe JimFoltz or TIG again]

or you can bake your own…

for importing from revit in ifc formatI have one that hides all the ‘Spaces’ and adds materials, but you can do all sorts of things…


I also took a look at the model and it appears as though you have spent a lot of time creating it and I see the time line reference yet it can be done a lot more efficiently than the way you have done it. You may like to check out PlusSpec for this type of work in general, it will save you days as it will automatically create the layers and components for you (as per Tigs reply), it will also give you a bill of quantities that is separated into the individual genres of product. Basically it was specifically made for this type of work.
In your example, It would probably be easier to simply set up a short cut for hide and update scene (windows> preferences> shortcuts)and hide the geometry and create a new scene with right click on the scene tab.

Thank you for the heads up on PlusSpec. I can see just how incredible it would be for this work. But it is a stretch for our job budget, sadly. However, I tried out you tip on shortcuts and hiding the geometries. I think that is a great help. Thank you.

Thank you for the suggestion. I will give it a try. I appreciate your time in answering.

Thanks for that. I was wondering if the ruby command could be modified to print the list in the same order as in the model?


The example code

Sketchup.active_model.layers.each{|layer| puts }

prints the layer names in the order those layers were created.

You can order your model’s layers alphanumerically.
But note how the default “Layer0” always stays at the top of the list.
To get the Ruby Console’s list in that order use this…

Sketchup.active_model.layers.each{|layer| names<< }
names.each{|name| puts name }

You also might check these:

Thanks TIG. That works a treat. Champion :partying_face:

Will do. Thanks.

Thanks guys. I really should spend more time checking out extensions. So many good ones. How big can your SU Toolbox get? I’m going to need a new ute to carry all me tools around in soon :construction_worker_man: