LayerChildCount

Returns the number of immediate child layers of a layer.

Syntax

rhinoscriptsyntax.LayerChildCount (layer)

rhinoscript.layer.LayerChildCount (layer)

Parameters

layer

Required.  String or Guid.  The name or id of the layer.

Returns

Number

The number of immediate child layers if successful

Example

import rhinoscriptsyntax as rs

children = rs.LayerChildCount("Default")

if children: rs.ExpandLayer("Default", True)

Also See

LayerChildren