Verifies that a layer is a child of another layer.
rhinoscriptsyntax.IsLayerChildOf (layer, test)
rhinoscript.layer.IsLayerChildOf (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 child of layer. False otherwise. |
import rhinoscriptsyntax as rs
rs.AddLayer("MyLayer1")
rs.AddLayer("MyLayer2", parent="MyLayer1")
rs.AddLayer("MyLayer3", parent="MyLayer2")
rs.MessageBox( rs.IsLayerChildOf("MyLayer1", "MyLayer3") )