Skip to main content
1-Visitor
May 30, 2013
Question

How to know if a feature corresponds to a part or an assembly?

  • May 30, 2013
  • 2 replies
  • 1360 views

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

2 replies

Emilie1-VisitorAuthor
1-Visitor
June 5, 2013

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

8-Gravel
June 11, 2013

Hello!

if (Type == PRO_FEAT_COMPONENT)

{

ProMdl Mdl;

ProMdlType MdlType;

err = ProAsmcompMdlGet(pFeature , &Mdl);

err = ProMdlTypeGet(Mdl, &MdlType);

}

Emilie1-VisitorAuthor
1-Visitor
June 11, 2013

Yes!

it is exactly this!!

Thank you, it is very easier than what I did before :-))

Emilie