Library | File

Class pfcUnit

# include <pfcUnits.h>

class pfcUnit
 : public virtual pfcChild
{
    xaideclare(pfcUnit)
    ...
};



Description

This class describes a particular unit in the model.
Manual References:
Solid: Solid Units, Overview of Creo Object TOOLKIT C++: Casting of Creo Object TOOLKIT C++ pfc Classes to wfc Classes
Direct Known Subclasses:
wfcWUnit



Method Summary

voidDelete ()
Delete the unit
pfcUnitConversionFactor_ptrGetConversionFactor ()
The relationship of the unit to its reference unit.
xstringGetExpression ()
The user-friendly unit description: the name (i.e. "ksi") for ordinary units and the expression (i.e. N/m^3) for system-generated units.
xboolGetIsStandard ()
Whether the unit is system-defined (value true) or user-defined (value false).
xstringGetName ()
voidSetName (xrstring value)
Specifies the name of the unit.
pfcUnit_ptrGetReferenceUnit ()
The reference unit of the unit.
pfcUnitTypeGetType ()
The type of quantity represented by the unit.
voidModify (pfcUnitConversionFactor_ptr ConversionFactor, pfcUnit_ptr ReferenceUnit)
Modify a unit's definition by applying a new conversion factor and reference unit.


Methods Inherited from Class pfcChild:

GetDBParent, GetOId



Method Detail

xstringGetName ()
voidSetName (xrstring value)

Specifies the name of the unit.

Exceptions thrown (but not limited to):

pfcXToolkitCantModify - The unit is referenced from the principal system of units and cannot be modified.


Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units, Solid: Modifying Individual Units, Solid: Modifying Individual Units




pfcUnitTypeGetType ()

The type of quantity represented by the unit.
Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units




xboolGetIsStandard ()

Whether the unit is system-defined (value true) or user-defined (value false).
Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units




pfcUnitConversionFactor_ptrGetConversionFactor ()

The relationship of the unit to its reference unit.
Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units




pfcUnit_ptrGetReferenceUnit ()

The reference unit of the unit.
Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units




xstringGetExpression ()

The user-friendly unit description: the name (i.e. "ksi") for ordinary units and the expression (i.e. N/m^3) for system-generated units.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The unit type was not recognized.


Manual References:
Solid: Accessing Individual Units, Solid: Accessing Individual Units




voidModify (pfcUnitConversionFactor_ptr ConversionFactor, pfcUnit_ptr ReferenceUnit)

Modify a unit's definition by applying a new conversion factor and reference unit.

Exceptions thrown (but not limited to):

pfcXToolkitCantModify - The unit cannot be modified because it is referenced from the principal system of units or it is referenced from ref_unit.


Manual References:
Solid: Modifying Individual Units, Solid: Modifying Individual Units
Parameters:
ConversionFactor
The relationship of the unit to its reference unit.
ReferenceUnit
The reference unit.
Returns:



voidDelete ()

Delete the unit

Exceptions thrown (but not limited to):

pfcXToolkitCantModify - The unit referenced from another unit or system of units and cannot be deleted.


Manual References:
Solid: Modifying Individual Units, Solid: Modifying Individual Units
Returns: