Verifies that a layer is a parent of another layer.
rhinoscriptsyntax.IsLayerParentOf (layer, test)
rhinoscript.layer.IsLayerParentOf (layer, test)
layer |
Required. String or Guid. The name or id of the layer to test against. |
test |
Required. String or Guid. The name or id of the layer to test |
Boolean |
True if test is a parent of layer. False otherwise. |
import rhinoscriptsyntax as rs
rs.AddLayer("MyLayer1")
rs.AddLayer("MyLayer2", parent="MyLayer1")
rs.AddLayer("MyLayer3", parent="MyLayer2")
rs.MessageBox( rs.IsLayerParentOf("MyLayer3", "MyLayer1") )