Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello all,
I am wondering how to know if a ProFeature corresponds to a part or an assembly?
I know that thanks to ProFeatureTypeGet, if the type of my feature is PRO_FEAT_COMPONENT, then my feature is eather part or assembly but I would like to know exactly...
Thank you
Emilie
I figured it out even if it is not very very easy :
the stuff is : the feature id = the last number of the asmcomppath of the solid. And it is possible to know if a solid is a part or an assembly (getModelType). it is also possible to know if a feature correspond to something that has geometry (use ProFeatureTypeGet(), if the type is PRO_FEAT_COMPONENT then this feature correspond to geometry).
Be carefull cause this id (feature id) is not unique in the whole model. it is unique in the reference of the owner--> a model can have several parts with the same feature id.
Emilie
Hello!
if (Type == PRO_FEAT_COMPONENT)
{
ProMdl Mdl;
ProMdlType MdlType;
err = ProAsmcompMdlGet(pFeature , &Mdl);
err = ProMdlTypeGet(Mdl, &MdlType);
}
Yes!
it is exactly this!!
Thank you, it is very easier than what I did before :-))
Emilie