Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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.
Solved! Go to Solution.
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.
Here are some helpful articles:
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.
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.