LayerNames

Returns the names of all layers in the document.

Syntax

rhinoscriptsyntax.LayerNames (sort=False)

rhinoscript.layer.LayerNames (sort=False)

Parameters

sort

Optional.  Boolean.  Return a sorted list of layer names. The default is not to return a sorted list (False).

Returns

list

An array of layer names if successful.

Example

import rhinoscriptsyntax as rs

layers = rs.LayerNames()

if layers:

    for layer in layers: print layer

Also See

LayerCount