# Select layer on which object is on?

**URL:** <https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815>\
**Category:** Rhino for Windows\
**Tags:** rhinolayer\
**Created:** [July 14, 2017, 6:04pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815 "2017-07-14T18:04:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShynnSup](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/shynnsup/32/767220_2.png) [@ShynnSup](https://discourse.mcneel.com/u/ShynnSup)\
**Post date:** [July 14, 2017, 6:04pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/1 "2017-07-14T18:04:50Z")

</div>

Hello everyone,

I am looking for a way to work more efficiently, and many times I need to hide a specific layer. I work with many layers and make2ds and sometimes it gets hard finding that one layer to turn off. Isnt there a way to:

1. select the object. Select the layer the object is on. Turn off the layer.

Note that simply selecting all objects with same layer attribute and hiding them would not be ideal, the ideal thing would be to turn off the layer

Thank you.

---

<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:** [July 14, 2017, 6:20pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/2 "2017-07-14T18:20:04Z")

</div>

Hi ShynnSup - when you have your objects selected, click on the hammer icon in Layers and choose 'Select object layer"

Does that do it?

-Pascal

---

<div class="post-metadata">

**Author:** ![ShynnSup](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/shynnsup/32/767220_2.png) [@ShynnSup](https://discourse.mcneel.com/u/ShynnSup)\
**Post date:** [July 14, 2017, 6:32pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/3 "2017-07-14T18:32:01Z")

</div>

Hey Pascal, thats it!  
Thank you!

---

<div class="post-metadata">

**Author:** ![chrisariasd](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/chrisariasd/32/67907_2.png) [@chrisariasd](https://discourse.mcneel.com/u/chrisariasd)\
**Post date:** [October 4, 2017, 2:32pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/4 "2017-10-04T14:32:43Z")

</div>

Any way this could be made into a macro/hotkey?

---

<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:** [October 4, 2017, 3:53pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/5 "2017-10-04T15:53:55Z")

</div>

Hi Chris - there is not, that I know of, in plain Rhino but it should be scriptable. I’ll take a look…

Here’s a quick Python:

```auto
import scriptcontext as sc
import rhinoscriptsyntax as rs

def HighlightLayers():
    
    ids = rs.SelectedObjects()
    if not ids:return
    
    layers = [rs.ObjectLayer(id) for id in ids]
    layers = list(set(layers))
    
    for layer in layers:
        parent = rs.ParentLayer(layer)
        while parent is not None:

            rs.ExpandLayer(parent, True)
            parent = rs.ParentLayer(parent)
            
    layers = [sc.doc.Layers.FindByFullPath(layer, -1) for layer in layers]
    sc.doc.Layers.Select(layers, True)
    
if __name__ ==" __main__":
    HighlightLayers()

```

Oh, I see Clement made something as well - you should be all set. Ah darn, - the script is V6, let me try it in V5… yeah looks like V6 only.

-Pascal

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/772979_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [October 4, 2017, 4:08pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/6 "2017-10-04T16:08:12Z")

</div>

Hi @pascal and @chrisariasd,

this macro seems to work for multiple objects on multiple layers:

`_SelNone _-Layer _Off _Select _Pause _Enter`

Note that the current layer cannot be hidden.  
\_  
c.

---

<div class="post-metadata">

**Author:** ![Holo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/holo/32/496872_2.png) [@Holo](https://discourse.mcneel.com/u/Holo)\
**Post date:** [January 11, 2018, 9:19am UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/7 "2018-01-11T09:19:41Z")

</div>

Thanks, that’s just what I needed!

---

<div class="post-metadata">

**Author:** ![Murat\_Erbas](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/murat_erbas/32/766967_2.png) [@Murat\_Erbas](https://discourse.mcneel.com/u/Murat_Erbas)\
**Post date:** [March 21, 2018, 10:05am UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/8 "2018-03-21T10:05:03Z")

</div>

Perfect 🙂 thanx alot!..

---

<div class="post-metadata">

**Author:** ![Andrew\_Nowicki](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/andrew_nowicki/32/60177_2.png) [@Andrew\_Nowicki](https://discourse.mcneel.com/u/Andrew_Nowicki)\
**Post date:** [March 22, 2018, 12:10am UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/9 "2018-03-22T00:10:12Z")

</div>

> [@ShynnSup](#):
>
> select the object. Select the layer the object is on. Turn off the layer.

OneLayerOff command does it well.

---

<div class="post-metadata">

**Author:** ![norviksetareh818](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/norviksetareh818/32/169198_2.png) [@norviksetareh818](https://discourse.mcneel.com/u/norviksetareh818)\
**Post date:** [August 21, 2019, 7:50pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/10 "2019-08-21T19:50:50Z")

</div>

THIS! 😀

---

<div class="post-metadata">

**Author:** ![AlexLazar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexlazar/32/410704_2.png) [@AlexLazar](https://discourse.mcneel.com/u/AlexLazar)\
**Post date:** [October 25, 2022, 1:30pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/11 "2022-10-25T13:30:58Z")

</div>

Hey Pascal,

Is there anyway that we can select the object and it shows us to which layer it belongs to? Instead of searching for layer it belongs to?

Thanks a lot!  
Aras

---

<div class="post-metadata">

**Author:** ![milezee](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/milezee/32/772924_2.png) [@milezee](https://discourse.mcneel.com/u/milezee)\
**Post date:** [October 26, 2022, 11:44am UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/12 "2022-10-26T11:44:03Z")

</div>

Hello, not sure if this is what you mean, select object, view the properties panel

 ![Properties Objects](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/1/8/f18e9bf20079792b51a9e0e0e3acadb2d3a4f823.png)

---

<div class="post-metadata">

**Author:** ![Samo\_Pergarec](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/samo_pergarec/32/488737_2.png) [@Samo\_Pergarec](https://discourse.mcneel.com/u/Samo_Pergarec)\
**Post date:** [October 26, 2022, 1:57pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/13 "2022-10-26T13:57:49Z")

</div>

Or you can select the object and type “\_What” which will give you all the properties of said object.

---

<div class="post-metadata">

**Author:** ![AlanMattano](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alanmattano/32/483292_2.png) [@AlanMattano](https://discourse.mcneel.com/u/AlanMattano)\
**Post date:** [February 26, 2024, 5:24pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/14 "2024-02-26T17:24:37Z")

</div>

Is there a macro that “Select the layer on which object is on?”

---

<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:** [February 26, 2024, 5:27pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/15 "2024-02-26T17:27:27Z")

</div>

Hello- `HighlightObjectLayers` in V8.

-Pascal

---

<div class="post-metadata">

**Author:** ![eobet](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/eobet/32/769335_2.png) [@eobet](https://discourse.mcneel.com/u/eobet)\
**Post date:** [February 27, 2024, 9:01am UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/16 "2024-02-27T09:01:26Z")

</div>

> [@pascal](#):
>
> Hello- `HighlightObjectLayers` in V8.

[Hello](https://discourse.mcneel.com/t/highlighting-layer-in-tree-of-currently-selected-object/7139/9).

So still a manual operation instead of being automatic. 😑

McNeel devs really don’t think very much about RSI. 😛

---

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [April 16, 2025, 1:20pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/17 "2025-04-16T13:20:45Z")

</div>

What is RSI? 👀

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [April 16, 2025, 2:22pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/18 "2025-04-16T14:22:46Z")

</div>

> **[Repetitive strain injury (RSI)](https://www.nhs.uk/conditions/repetitive-strain-injury-rsi/)**
>
> Find out about repetitive strain injury (RSI), including what the symptoms are, what causes it, what you can do to treat it and when to get medical help.

---

<div class="post-metadata">

**Author:** ![John\_Williams](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/john_williams/32/744843_2.png) [@John\_Williams](https://discourse.mcneel.com/u/John_Williams)\
**Post date:** [April 16, 2025, 4:04pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/19 "2025-04-16T16:04:01Z")

</div>

Why can it be as simple as any object selected is graphically indicated in the layer panel? Same way the material palette works thusly:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/7/0/e70d6d6c168e841ac38485eb7d2a5e58e117e950.jpeg)

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [April 16, 2025, 4:20pm UTC](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815/20 "2025-04-16T16:20:13Z")

</div>

Because it takes a lot of graphics and cpu resources to constantly update the panel which could result in significant slowdowns.

[Next page](https://discourse.mcneel.com/t/select-layer-on-which-object-is-on/45815.md?page=2)
