What command select all objects on layer the selected object is on?


If I select an object and wish to then have all objects on that objects layer also get selected, what command will do that ?


SelLayer selects all the objects on a layer, and has an option to pick an object to determine the name of the layer.

1 Like


Needing this command, when I type SelLayer I see no option to pick the object so as to then have it find the layer and select all on it.
How does one use that option ?

I have hundreds of layers, so selecting one from a list is not an option, yet again this is another reason for my request to have an indicator appear in layers palette when selecting an object. (my survey as requested by McNeel of all the different reasons why I need that is now a few pages long and will be posted soon.)


1 - Run SelLayer
2 - Click on the Select button
3 - Click an object on the layer you’re interested in. The name of the layer is shown and highlighted
4 - Click OK - Everything on the layer is selected.

You can also use

_-SelLayer _Pick

But @John_Brock, this does not appear to work for prepicked objects, which is a bug IMO…



That looks like a bug to me too. I’ll get it on the list.

Thanks John, simple when you know how…

(…and oh I wish that could be the way of getting the layer to show up in the normal layer palette.
I spend half my time trying to find the layer an item is on, truly a massive time hog.
That one ability to do what umpteen commands might also do, if I could remember them all, one does for many is better…for me, …but I digress.)


Hi John, I still can find a solution for selecting all objects on the layer of a prepicked object.

Hi Steve1, have you found a one-step solution to this yet?

Apparently, this will only be fixed for the next version of Rhino. Below is a script that will do what you would like in V5. You can select multiple objects on multiple layers.


Edit - probably needs the redraw cut for the cases with many objects and many layers… please re-download…

SelectAllObjsOnObjLayers.py (309 Bytes)

Here is an oldish macro doing the same:

_Select _Pause _NoEcho _SetRedrawOff _SelNone _-SelLayer _Pick _SelPrev _Enter _SetRedrawOn


1 Like

Hi, [quote=“jpygmy, post:9, topic:8280, full:true”]
Hi Steve1, have you found a one-step solution to this yet?

not yet, but I will try Mitch’s and clements solutions.



I know this is an old thread, but does anyone know if this macro was made into a command for V6, or will it be part of V7?

It’s wildly helpful.


Hi @lignindes, it’s not in V6. I cannot say anything for V7 but the macro still works.



Yes, the macro works well, but I want to use it in combination with ShowSelected.

In this case it doesn’t work. Could the macro be modified so that it would work after ShowSelected was run?


Hi Dan - yeah, I don’t see that working - SelPrev will break it because the previous is now in a hidden state and cannot be selected.

Here’s a script that may work for now -

ShowSelectedByMatchingLayer.py (1020 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

Actually kind of handy…



Thanks for making this script. I see it being useful in the case where you want to show all the hidden elements on a layer, based upon your current selection.

However, my ideal is to run ShowSelected, then select one element on another layer to then highlight and show all the objects on that layer. The manual way to do this is to run ShowSelected, go to the layer panel, right click on the layer, click Select objects and hit enter.

Ideally I’d like to run the script after running ShowSelected and selecting an object on the layer I want to reveal:

Is this possible with the way ShowSelected works at present?

I suppose another way to explain what I’d like to do is to sequentially reveal layers by only having to select one object that belongs to said layer.