Library | Module

Class pfcUnit



Description

This class describes a particular unit in the model.
Direct Parent Classes:
pfcChild



Property Summary

/* readonly */ pfcUnitConversionFactorConversionFactor
The relationship of the unit to its reference unit.
/* readonly */ stringExpression
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.
/* readonly */ booleanIsStandard
Whether the unit is system-defined (value true) or user-defined (value false).
stringName
Specifies the name of the unit.
/* readonly */ pfcUnitReferenceUnit
The reference unit of the unit.
/* readonly */ pfcUnitTypeType
The type of quantity represented by the unit.



Method Summary

voidDelete ()
Delete the unit
voidModify (pfcUnitConversionFactor ConversionFactor, pfcUnit ReferenceUnit)
Modify a unit's definition by applying a new conversion factor and reference unit.



Property Detail


/* readonly */ pfcUnitConversionFactorConversionFactor

The relationship of the unit to its reference unit.




/* readonly */ stringExpression

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.






/* readonly */ booleanIsStandard

Whether the unit is system-defined (value true) or user-defined (value false).




stringName

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.






/* readonly */ pfcUnitReferenceUnit

The reference unit of the unit.




/* readonly */ pfcUnitTypeType

The type of quantity represented by the unit.





Method Detail


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.





voidModify (pfcUnitConversionFactor ConversionFactor, pfcUnit 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.


Parameters:
ConversionFactor
The relationship of the unit to its reference unit.
ReferenceUnit
The reference unit.