SilverScreen Solid Modeler

FindChild method

FindChild method

Previous topic Next topic  

FindChild method

Previous topic Next topic JavaScript is required for the print function  




BOS_NODE FindChild(string name);              


string name;   // A System.String object





using SilverSharp;


The FindChild method searches the block entity for a child with the name specified. The search is case-insensitive and searches only immediate children (not all descendents).




name is a string containing the name of the child entity you wish to find.



Return Value

FindChild returns a SilverSharp.BOS_NODE object if successful, or null otherwise.




The inherited IsEmpty method can be used to test the result.



See Also

BLOCK_NODE, Entity types, IsEmpty




The following code searches a BLOCK_NODE (assumed to be valid) for a child called 'door':


C# Code


 using SilverSharp;


 . . .


 BLOCK_NODE blk = new BLOCK_NODE("block ROOT");

 BOS_NODE   bos;


 if ( BOS_NODE.IsEmpty(blk) )



 bos = blk.FindChild("door");


 if ( BOS_NODE.IsEmpty(bos) )



 SC.error_message("A child named door was located: {0}", bos);