Returns the number of immediate child layers of a layer.
rhinoscriptsyntax.LayerChildCount (layer)
rhinoscript.layer.LayerChildCount (layer)
layer |
Required. String or Guid. The name or id of the layer. |
Number |
The number of immediate child layers if successful |
import rhinoscriptsyntax as rs
children = rs.LayerChildCount("Default")
if children: rs.ExpandLayer("Default", True)