LayerName

Returns the name of a layer given the layer's identifier.

Syntax

rhinoscriptsyntax.LayerName (layer_id, fullpath=True)

rhinoscript.layer.LayerName (layer_id, fullpath=True)

Parameters

layer_id

Required.  String or Guid.  The identifier of an existing layer.

fullpath

Optional.  Boolean.  If True (Default), the layer's full path name is returned. If False, the layer's short name, as it appears in Rhino's Layer dialog, is returned.

Returns

String

The layer's name if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

layers = rs.LayerIds()

if layers:

    for layer in layers: print rs.LayerName(layer)

Also See

LayerId