Verifies the existence of a layer in the document.
rhinoscriptsyntax.IsLayer (nameOrId)
rhinoscript.layer.IsLayer (nameOrId)
nameOrId |
Required. String or Guid of layer to search for |
True |
If successful. |
False |
If not successful. |
import rhinoscriptsyntax as rs
layer = rs.GetString("Layer name")
if rs.IsLayer(layer):
print "The layer exists."
else:
print "The layer does not exist."