cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

Model feat ID

JD_2779181
9-Granite

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 

1 ACCEPTED SOLUTION

Accepted Solutions
RPN
14-Alexandrite
14-Alexandrite
(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
VladimirN
23-Emerald IV
(To:JD_2779181)

Here are some helpful articles:

 

RPN
14-Alexandrite
14-Alexandrite
(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

JD_2779181
9-Granite
(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