Category Parameters and relations, Object ProRelation

Function ProRelationFunctionRegister


Description
Register an external function to be used in relations.
Replacement in Object TOOLKIT: pfcBaseSession::RegisterRelationFunction
Synopsis
#include <ProRelSet.h>
ProErrorProRelationFunctionRegister(
char* extfunc_name
/* (In)
name of new relation function used in the relations.
*/
ProRelfuncArg* arg_descr_arr
/* (In)
argument description ProArray. Can be NULL if:
  1. no arguments should be supplied to the new function.
  2. you don't want Creo Parametric to check the validity of arguments (in conjunction with 'dis_type_ctrl' = PRO_B_TRUE).
*/
ProRelationReadFunction read_func
/* (In)
function that implements read-access of external function; can be NULL;
*/
ProRelationWriteFunction write_func
/* (In)
function that implements write-access of external function; can be NULL;
*/
ProRelationArgscheckFunction check_func
/* (In)
function to check arguments of external function; can be NULL;
*/
ProBoolean dis_type_ctrl
/* (In)
PRO_B_TRUE to disable type checking for arguments. PRO_B_FALSE indicates that the arguments will be checked.
*/
ProAppData app_data
/* (In)
application data passed to the relation callbacks. Can be NULL.
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more inputs was invalid.
PRO_TK_E_FOUNDFunction with the given name was already found.

Manual References:

  1. Production Applications: Manufacturing: Using External Functions to Define Parameters in the Manufacturing Step Table
  2. Core: Relations: Adding a Customized Function to the Relations Dialog in Creo Parametric
  3. Core: Relations: Adding a Customized Function to the Relations Dialog in Creo Parametric

Sample Code References:

  1. pt_userguide ( UgCustomRelationFunction.c )
  2. pt_userguide ( UgCustomRelationFunction.c )
  3. pt_userguide ( UgCustomRelationFunction.c )