Category Parameters and relations, Object ProParameter

Function ProParameterValueWithUnitsSet


Description
Sets the value given with units of an existing ProParameter.
Replacement in Object TOOLKIT: wfcWParameter::SetValueWithUnits
Synopsis
#include <ProParameter.h>
ProErrorProParameterValueWithUnitsSet(
ProParameter* param
/* (In)
The handle of the parameter to set
*/
ProParamvalue* proval
/* (In)
The new value. The value assumed to be in the units specified by units argument (when the units argument is not NULL) or in the units of the owner model, when argument units is NULL.
*/
ProUnititem* units
/* (In)
The new units. The units must be the same quantity type as the parameter's units (i.e. if the units are "inch", a value can be expressed in "cm"). Can be NULL. If you pass NULL, the function will assume the units of the owner model.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully set the value and units.
PRO_TK_E_NOT_FOUNDThe owner was not found.
PRO_TK_BAD_INPUTSOne or more arguments was invalid.
PRO_TK_INVALID_TYPEThe unit type provided does not match the units of the parameter.
PRO_TK_GENERAL_ERRORThe parameter was not found, or the function could not perform the action.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Techniques of Conversion and Mixing
  2. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  3. Assembly: Data Sharing Features: Accessing Properties of Variant Features
  4. Core: Parameters: Accessing Parameters
  5. Core: Parameters: Accessing Parameters
  6. Production Applications: Sheetmetal: Geometry Analysis

Sample Code References:

  1. pt_examples ( TestParams.c )
  2. pt_geardesign ( GearDesign.c )
  3. pt_userguide ( UgModelCheck.c )
  4. pt_userguide ( UgParamFeatLabel.c )