# Quick select layers?

**URL:** <https://discourse.mcneel.com/t/quick-select-layers/100710>\
**Category:** Rhino for Windows\
**Created:** [April 23, 2020, 2:56am UTC](https://discourse.mcneel.com/t/quick-select-layers/100710 "2020-04-23T02:56:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.prinsen](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/chris.prinsen/32/183631_2.png) [@chris.prinsen](https://discourse.mcneel.com/u/chris.prinsen)\
**Post date:** [April 23, 2020, 2:56am UTC](https://discourse.mcneel.com/t/quick-select-layers/100710/1 "2020-04-23T02:56:59Z")

</div>

I do a lot of plans and sections in rhino and due to the inconsistencies with missing lines in Make2D (not complaining but always room for improvement) I am constantly having to click a line \_what to see the layer it is in, go over to the layer panel to activate that layer, then continue to fix the line (adding a polyline, trimming, etc)

My question: is there a way to Click an object (crv/srf/mesh etc), and it will automatically activate the layer that object is in so I can proceed to edit without having to do the aforementioned process. This seems stupid but it adds a significant amount of time when you are dealing with a hundred tiny crvs on 20-30 diff layers.

Thanks!

---

<div class="post-metadata">

**Author:** ![pascal](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/pascal/32/479395_2.png) [@pascal](https://discourse.mcneel.com/u/pascal)\
**Post date:** [April 23, 2020, 3:03am UTC](https://discourse.mcneel.com/t/quick-select-layers/100710/2 "2020-04-23T03:03:58Z")

</div>

Hi Chris - the obuject layer turns up in the status bar layer control, so look there for the layer, but in the layer control under the tools (hammer icon) there is a ‘Select object layer’ entry

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/5/5/55f5dc25c8f7b438701b66b76a583b841b0514e8.png)

I have a script someplace that will let you do this from a hot key - if that would be helpful I’ll dig it up.

-Pascal

---

<div class="post-metadata">

**Author:** ![Jarek](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jarek/32/511212_2.png) [@Jarek](https://discourse.mcneel.com/u/Jarek)\
**Post date:** [April 23, 2020, 4:56am UTC](https://discourse.mcneel.com/t/quick-select-layers/100710/3 "2020-04-23T04:56:44Z")

</div>

Hi Chris,

You can take a look at this script:

> [@Highlight selected objects in Layers](https://discourse.mcneel.com/t/highlight-selected-objects-in-layers/60875/22):
>
> The script originally posted had a bug that would cause some layers in multi-nested structures not to get selected (the parent layers would not expand, therefore preventing selection). Here is a version with the bug fixed, for anyone interested that is using the script: [DIG\_SelectObjectsLayers.rvb](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/2/d/2d56923e77313b410eeb37633e6de85cafaa447b.rvb) (2.3 KB) The command/alias is: DIG\_SelectObjectsLayers –jarek

Save it on your HD and drag-and-drop to Rhino vport to install. The command “DIG\_SelectObjectsLayers” will become available.

You can assign it to any button or keyboard shortcut - if you simply want to select the layer of selected object (or layers of selected objects) the macro would be:

` DIG_SelectObjectsLayers _Enter`

There are some other options available and you can create them with similar macros (select all objects on layers of selected objects, also undo layer selection if you just want to take a look and get back to previous state). The script should be smart enough to expand all layer parent layers so the nested layers get selected as well. I use it all the time as a handy keyboard shortcut.

PS. This is for Windows only. I am guessing Pascal may have Python version that would work on both systems.

hth,

–jarek

---

<div class="post-metadata">

**Author:** ![emilio](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/emilio/32/771014_2.png) [@emilio](https://discourse.mcneel.com/u/emilio)\
**Post date:** [April 23, 2020, 7:42am UTC](https://discourse.mcneel.com/t/quick-select-layers/100710/4 "2020-04-23T07:42:45Z")

</div>

Hi Chris

> [@chris.prinsen](#):
>
> Click an object (crv/srf/mesh etc), and it will automatically activate the layer that object is

The **\_SetLayerToObject** command might do what you need.  
( Also in the third button, RMB, in the Layer toolbar here: )

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/1/3/1332bcf82ebd9169dcc2c9d0991cad3d8e7ecbb0.png)

HTH, Regards.

---

<div class="post-metadata">

**Author:** ![chris.prinsen](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/chris.prinsen/32/183631_2.png) [@chris.prinsen](https://discourse.mcneel.com/u/chris.prinsen)\
**Post date:** [April 23, 2020, 1:39pm UTC](https://discourse.mcneel.com/t/quick-select-layers/100710/5 "2020-04-23T13:39:18Z")

</div>

Thanks everyone, all very great answers. Sometimes its funny how much time you spend doing something and then you realize…is there a shortcut for this? 🙃
