Hi all. I do want to create a simple script to switch the visibility of the layer Default between On/Off running the same command. So if the layer Default is On when I do run this script, to switch the visibility of the layer to Off and if the visibility of the layer is Off when I do run the script, to switch the visibility to On. I do created a piece of code that does only the half of the work, I do need a way to get the visibility status of the layer and change to the opposite value.
import rhinoscriptsyntax as rs
l = 'Default'
rs.LayerVisible(l, visible=False)
4 posts - 2 participants