Verifies that an existing layer is visible (normal, locked, and reference).
rhinoscriptsyntax.IsLayerVisible (layer)
rhinoscript.layer.IsLayerVisible (layer)
layer |
Required. String or Guid. The name or id of an existing layer. |
True |
If successful. |
False |
If not successful. |
import rhinoscriptsyntax as rs
layer = rs.GetString("Layer name")
if rs.IsLayer(layer):
if rs.IsLayerVisible(layer): print "The layer is visible"
else: print "The layer is not visible"
else:
print "The layer does not exist."