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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

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

Emilie
1-Newbie

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

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.
3 REPLIES 3
Emilie
1-Newbie
(To: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

LarsZiegler
5-Regular Member
(To: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

Announcements


Top Tags