cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to get the Component Path of each Component in assembly in Jlink?

ddhini
14-Alexandrite

How to get the Component Path of each Component in assembly in Jlink?

I extract all the Component Id's inside my assembly by following recrusive function .

private static void recursiveTraverseBOM(Model model, Session session) {
try {
if(model.GetType().equals(ModelType.MDL_ASSEMBLY)) { //We have an assembly Features components = ((Solid) model).ListFeaturesByType(null, FeatureType.FEATTYPE_COMPONENT); //MEMBERS OF COMPONENT for(int i = 0; i < components.getarraysize(); i++) { ComponentFeat component = (ComponentFeat) components.get(i);//next component String id=" "+ component.GetId()+" "; ModelDescriptor md = component.GetModelDescr(); Model componentModel = session.GetModelFromDescr(md);//get the model recursiveTraverseBOM(componentModel, session); } }
}catch(Exception e){
//do nothing..
}
}

Here i am gets all the Components Id's i need the Component path .I dont know how to get the Component path from a component .Please anybody help on this ...

Thanks Regards,

Diensh 

0 REPLIES 0
Top Tags