Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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?
Solved! Go to Solution.
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.
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.
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.