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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Model feat ID

JD_2779181
10-Marble

Model feat ID

Hello,

 

Do you know how to get model ID in an assembly.

I tried ProMdlIdGet but it gives me the ID of the model part  separated from the assembly. And when the model part has the same name but not the same placement, it always gives me the same ID.

Well, how to get those feat ID in the picture?

I have the assembly model, the list of part model, the ProAsmcomppath.

 

Thank you very much.

 

@MichelH @ysinitsyn @rghadge

 

finalresultCreo.png 

ACCEPTED SOLUTION

Accepted Solutions
RPN
17-Peridot
17-Peridot
(To:JD_2779181)

You can‘t have the same assembly in session with different feature ids. So the component path is here not a question. This call will convert the feature Id / Component to a model. The model item owner is always the parent assembly.


extern ProError ProAsmcompMdlGet (ProAsmcomp *p_feat_handle,
ProMdl *p_mdl_handle);
/*
Purpose: Retrieves the component model, given a component feature.

Input Arguments:
p_feat_handle - The handle to the component feature

Output Arguments:
p_mdl_handle - The model handle to be initialized

Return Values:
PRO_TK_NO_ERROR - The argument corresponds to a valid component
feature with a valid component model.
PRO_TK_BAD_INPUTS - The specified feature is not a valid component
feature.
PRO_TK_E_NOT_FOUND - Assembly component model is not a solid or
is not in memory.

View solution in original post

4 REPLIES 4

Here are some helpful articles:

 

RPN
17-Peridot
17-Peridot
(To:JD_2779181)

You can‘t have the same assembly in session with different feature ids. So the component path is here not a question. This call will convert the feature Id / Component to a model. The model item owner is always the parent assembly.


extern ProError ProAsmcompMdlGet (ProAsmcomp *p_feat_handle,
ProMdl *p_mdl_handle);
/*
Purpose: Retrieves the component model, given a component feature.

Input Arguments:
p_feat_handle - The handle to the component feature

Output Arguments:
p_mdl_handle - The model handle to be initialized

Return Values:
PRO_TK_NO_ERROR - The argument corresponds to a valid component
feature with a valid component model.
PRO_TK_BAD_INPUTS - The specified feature is not a valid component
feature.
PRO_TK_E_NOT_FOUND - Assembly component model is not a solid or
is not in memory.

JD_2779181
10-Marble
(To:RPN)

Thank you very much! You are a genius

Feat ID = Component ID.

If you have ProAsmcomppath for each component of the assembly. Then the last ID in the id_table array - is a ID for this component.

Announcements


Top Tags