# Script OneLayerOff

**URL:** <https://discourse.mcneel.com/t/script-onelayeroff/17082>\
**Category:** Scripting\
**Created:** [February 25, 2015, 4:22am UTC](https://discourse.mcneel.com/t/script-onelayeroff/17082 "2015-02-25T04:22:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [February 25, 2015, 8:11am UTC](https://discourse.mcneel.com/t/script-onelayeroff/17082/4 "2015-02-25T08:11:56Z")

</div>

You should be able to at least test the script by running the EditPythonScript command and then paste the following:

```python
import rhinoscriptsyntax as rs
layername = rs.GetString("")
if rs.IsLayer(layername):
    if rs.LayerVisible(layername)==True:
        rs.LayerVisible(layername,False)

```

---

_[View the full topic](https://discourse.mcneel.com/t/script-onelayeroff/17082)._
