IsLayer

Verifies the existence of a layer in the document.

Syntax

rhinoscriptsyntax.IsLayer (nameOrId)

rhinoscript.layer.IsLayer (nameOrId)

Parameters

nameOrId

Required.  String or Guid of layer to search for

Returns

True

If successful.

False

If not successful.

Example

import rhinoscriptsyntax as rs

layer = rs.GetString("Layer name")

if rs.IsLayer(layer):

    print "The layer exists."

else:

    print "The layer does not exist."

Also See

IsLayerChangeable

IsLayerEmpty

IsLayerLocked

IsLayerOn

IsLayerReference

IsLayerSelectable

IsLayerVisible