Add new units to a numeric set
- Last UpdatedSep 19, 2024
- 2 minute read
-
When adding new units you will be adding a multiplier and offset to convert the unit to the base unit. You will need to determine what the base unit for the numeric set is.
To do so, from the Select Table tab, double-click unitBaseDesc to open the tab and navigate to it.
-
unitBaseDesc.<module>
-
unitBaseDesc.CD_PROJECT. For more information refer to Add a new numeric set.
-
-
Set the module to CD_PROJECT.
-
If the CD_PROJECT module is not in the module dropdown, select New Module to add it.
-
Select Insert.
-
A new row will appear.
-
Create or update unitDesc in the CD_PROJECT module and add the new units.
Consider the following example, in which we create two entries in order to create two units for voltage:
To add volts, enter the following in each field:
-
unitCode — 888
-
unitName — Volts
-
description — Volts
-
unitBaseDesc:unitBaseName — Volts
-
baseMultiplier — 1
This is set to 1 because it is the unitBaseDesc.
-
baseOffset — 0
-
libraryOffset — 0
libraryOffset is obsolete and not used. It should be set to 0.
-
unitDefine — UD_VOLTS
To add kilovolts (kvolts), enter the following in each field:
-
unitCode — 889
-
unitName — kVolts
-
description — 1000 Volts
-
unitBaseDesc:unitBaseName — Volts
-
baseMultiplier — 0.001
For more information, refer to the paragraph below.
-
baseOffset — 0
-
libraryOffset — 0
libraryOffset is obsolete and not used. It should be set to 0.
-
unitDefine — UD_KVOLTS
The conversion from the unit to its base unit must be supplied. The unit conversion can only perform linear y = mx +b conversions, where:
-
m is the baseMultiplier
-
b is the baseOffset
For example, for voltage, the base unit is in volts. To convert Volts to kVolts, multiply by 0.001. Therefore, the baseMultiplier is 0.001 and the baseOffset is 0.
Note: libraryOffset is obsolete and not used. It should be set to 0.
-
-
The unit must also be associated with the numeric set. For example, volts and kVolts are units of voltage. To make this association, add rows to the unitSetRefer table in the CD_PROJECT module:
To add volts, enter the following in each field:
-
unitSetCode — 888
-
numericSetDefine — NSD_VOLTAGE
-
unitDefine — UD_VOLTS
To add kvolts, enter the following in each field:
-
unitSetCode — 889
-
numericSetDefine — NSD_VOLTAGE
-
unitDefine — UD_KVOLTS
-
-
Go to the Save and Load tab.
-
Select Save All.
-
Select Update Database.