Category Creo Parametric fundamentals, Object ProUnit

Function ProUnitCreate


Description
Creates a custom unit. Works only with basic quantities: PRO_UNITTYPE_LENGTH, PRO_UNITTYPE_MASS, PRO_UNITTYPE_FORCE, PRO_UNITTYPE_TIME, PRO_UNITTYPE_TEMPERATURE, PRO_UNITTYPE_ANGLE.
Replacement in Object TOOLKIT: pfcSolid::CreateCustomUnit
Synopsis
#include <ProMdlUnits.h>
ProErrorProUnitCreate(
ProMdl mdl
/* (In)
The model handle.
*/
ProName unit_name
/* (In)
The unit name.
*/
ProUnitConversion* conversion
/* (In)
The conversion factor for the unit.
*/
ProName ref_unit
/* (In)
The reference unit for the unit.
*/
ProUnititem* new_unit
/* (Out)
The new unit handle. May be NULL.
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more arguments was invalid.
PRO_TK_E_NOT_FOUNDThe reference unit was not found in the model.

Manual References:

  1. Core: Solids, Parts, and Materials: Solid Units