SilverScreen Solid Modeler

BosList.FromAncestors method

BosList.FromAncestors method

Previous topic Next topic  

BosList.FromAncestors method

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

public static BosList FromAncestors(string bos_path)

public static BosList FromAncestors(BOS_NODE bos)

 

string   bos_path;   // A System.String

BOS_NODE bos;        // A SilverSharp.BOS_NODE

 

 




Synopsis

The FromAncestors methods return a BosList class that will enumerate every parent block of an entity

 

 

Parameters

bos_path is a string that is a SilverScreen path to an entity

bos is a SilverSharp.BOS_NODE whose parental ancestors are to be retrieved

 

 

Return Value

FromAncestors returns a BosList class

 

 

Remarks

This function retrieves all of the ancestors of an entity. In the familial parlance, it will retrieve parents and grandparents

 

 

See Also

BosList, FromChildren, FromDescendants

 

 

Example

To visit all of the parents of an entity, do this:

C# Code

 

 using SilverSharp;

 

 . . .

 

 BosList bl = BosList.FromAncestors("\\assembly\\a1\\a2\\claw\\claw2");

   

 foreach ( BOS_NODE bos in bl )

    {

    VisitOneBos(bos);

    }