Returns or modifies the parent layer of a layer.
Rhino.ParentLayer (strLayer [, strParent])
strLayer |
Required. String. The name or identifier of the layer. |
strParent |
Optional. String. The name or identifier of the new parent layer. To remove the parent layer, thus making a root-level layer, specify either Null or an empty string, or "". |
String |
If strParent is not specified, the name of the current parent layer if successful. |
String |
If strParent is specified, the name of the previous parent layer if successful. |
Null |
If the layer does not have a parent, or on error. |
Dim arrLayers, strLayer, strParent
arrLayers = Rhino.LayerNames
For Each strLayer In arrLayers
strParent = Rhino.ParentLayer(strLayer)
If IsNull(strParent) Then
Rhino.Print "Layer: " & strLayer & ", Parent: <none>"
Else
Rhino.Print "Layer: " & strLayer & ", Parent: " & strParent
End If
Next