Category Features, Object ProFeature

Function ProFeatureSelectionGet


Description
Retrieves reference information for a feature created in Assembly mode.

The function fills in the following fields in the ProSelection structure: 

p_selection -> sel_obj - The p_feature

p_selection -> comp_path.owner - The feature reference assembly

p_selection -> comp_path.comp_id_table - The path from the
reference assembly to the part where the feature
was created

p_selection -> comp_path.table_num - The size of the comp_id_table

NOTE:

If the feature does not have a reference assembly (that is, it has local references only), the returned values are as follows:

p_selection -> comp_path.owner.id = PRO_VALUE_UNUSED;
p_selection -> comp_path.owner.type = PRO_TYPE_UNUSED;

p_selection -> comp_path.table_num - PRO_VALUE_UNUSED;
Synopsis
#include <ProFeature.h>
ProErrorProFeatureSelectionGet(
ProFeature* p_feature
/* (In)
The feature
*/
ProSelection* p_selection
/* (Out)
The data structure to be filled in
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully filled in the data structure.
PRO_TK_BAD_INPUTSThe input argument is invalid.
PRO_TK_BAD_CONTEXTThe specified feature does not have a reference assembly.
PRO_TK_E_NOT_FOUNDThe reference assembly is not in session.
PRO_TK_GENERAL_ERRORA major problem occurred, usually object corruption. For example, the function may have found the reference assembly, but the owner part does not match the component path. In this case, the p_selection will be initialized with the obtained data, but might be invalid.

Manual References:

  1. Core: Features: Feature Inquiry
  2. Core: Features: Feature Inquiry

Sample Code References:

  1. pt_examples ( UtilFeats.c )
  2. pt_userguide ( UgSimprepInfo.c )