CimMeasurementAssociation.DisplayFormat (property)

Gets and sets the display format in equivalent form.
Syntax: String = object.DisplayFormat
object.DisplayFormat = String
Description: The DisplayFormat property gets and sets the display format in equivalent form. The DisplayFormat uses the "C" language format specifiers. These must be floating point format specifies. The following are valid.

%f - Fixed
%g - Compact

%e - Scientific

. Width, precision, and justification attributes may also be specified.

Format Examples:

%5.2f - right justified with a width of 5 and a precision of 2

. %-5.2f - left justified with a width of 5 and a precision of 2

. %06.3f - zero padded with a width of 6 and a precision of 3

.



Example:

Dim project As CimProject
Set project = CreateObject("CimProject")
project.OpenLocalProject "d:\classes\classes.gef"
Dim measurementManager As CimMeasurementManager
Dim measurementAssocList As CimMeasurementAssociationList
Dim measurementAssoc As CimMeasurementAssociation
Dim measurementUnitList As CimMeasurementUnitList
Dim measurementUnit As CimMeasurementUnit
Set measurementManager = project.MeasurementManager
Set measurementUnitList = measurementManager.Units
Set measurementUnit = measurementUnitList.Item("METER")
Set measurementAssocList = measurementUnit.SystemAssociations
Set measurementAssoc = measurementAssocList.Item("Metric")
MsgBox measurementAssoc.DisplayFormat