CurrentLayer

Returns or changes the current layer.

Syntax

rhinoscriptsyntax.CurrentLayer (layer=None)

rhinoscript.layer.CurrentLayer (layer=None)

Parameters

layer

Optional.  String or Guid.  The name or if of an existing layer to make current.

Returns

String

If a layer name is not specified, the name of the current layer if successful.

String

If a layer name is specified, the name of the previous current layer if successful.

Example

import rhinoscriptsyntax as rs

rs.AddLayer("MyLayer")

rs.CurrentLayer("MyLayer")

Also See

AddLayer

DeleteLayer

RenameLayer