Creates a measurement unit. | |
Syntax: | Set CimMeasurementUnit = object.Add ( UNitID ) |
Parameters: |
UNitID As
String - Name of the new
measurement unit
|
Description: | CimMeasurementUnitList.Add returns a new
CimMeasurementUnit object.
This is the method to call to create a new item. You must call
CimMeasurementManager.Save
to save the complete state of the measurement configuration. Example: Dim project As CimProject Set project = CreateObject("CimProject") project.OpenLocalProject "d:\classes\classes.gef" Dim measurementManager As CimMeasurementManager Dim measurementUnitList As CimMeasurementUnitList Dim measurementUnit As CimMeasurementUnit Set measurementManager =
project.MeasurementManager Set measurementUnitList = measurementManager.Units Set measurementUnit =
measurementUnitList.Add("METER") measurementUnit.Description = "a metric measure of
length" measurementManager.Save False |