Verifies that an existing layer is on.
rhinoscriptsyntax.IsLayerOn (layer)
rhinoscript.layer.IsLayerOn (layer)
layer |
Required. String or Guid. The name 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.IsLayerOn(layer): print "The layer is on."
else: print "The layer is not on."
else:
print "The layer does not exist."