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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to tell if a model is a top assembly?

RLEECI
6-Contributor

How to tell if a model is a top assembly?

I could check if a model is an assembly 

 

model.GetType() == ModelType.MDL_ASSEMBLY

However, how can I check if it is top level assembly or just sub-assembly? 

1 ACCEPTED SOLUTION

Accepted Solutions
KenFarley
21-Topaz I
(To:RLEECI)

There isn't any data stored in an assembly that indicates what assemblies it is a part of. An assembly only refers to its components, be they parts or further assemblies. It doesn't go the other way. The only place you might be able to get at that kind of information would be in Windchill or a similar data management system. You aren't going to be able to get any information of the sort from a Creo assembly file.

View solution in original post

3 REPLIES 3
KenFarley
21-Topaz I
(To:RLEECI)

There isn't any data stored in an assembly that indicates what assemblies it is a part of. An assembly only refers to its components, be they parts or further assemblies. It doesn't go the other way. The only place you might be able to get at that kind of information would be in Windchill or a similar data management system. You aren't going to be able to get any information of the sort from a Creo assembly file.

RLEECI
6-Contributor
(To:KenFarley)

Thank you very much. I asked this one because I used to program with NX and I could determine this information by checking for its owner/parent.  

You might would like to go through "ProAsmcomppath". For top model , it should be -1,-1,-1..... and for other models, asm_comp_path is structure of relative paths.

Top Tags