A Long value. Specifies the units of measure used in the document.
Applies to: Document object
[[Let] unitIndexRet =] object.UnitIndex [Let] object.UnitIndex = unitIndexSet |
The UnitIndex property syntax has these parts:
Part | Description |
object | Required. An expression that returns an instance of the Document object. |
unitIndexRet | Optional. A Long type variable. |
unitIndexSet | Required. An expression that returns a Long value. |
You can also change the UnitIndex property from within ConceptDraw in the "File->Document Properties->Settings" dialog. ConceptDraw Basic has pre-defined constants, which correspond to various units of measure. The UnitIndex can take only one of these values. Below is the table which lists the constants:
Constant | Value | Description |
cdYard | 0 | Yards, decimal. |
cdFoot | 1 | Feet, decimal. |
cdFootInch | 2 | Feet, decimal inches. |
cdFootFractInch | 3 | Feet, fractional inches |
cdInch | 4 | Decimal inches. |
cdFractInch | 5 | Fractional inches. |
cdMeter | 6 | Meters. |
cdCm | 7 | Centimeters. |
cdMm | 8 | Millimeters. |
cdKm | 9 | Kilometers. |
cdMile | 10 | Miles. |
This example contains a document-level script. It switches between various units of measure: yards, feet, meters, centimeters, kilometers and miles.
thisDoc.UnitIndex = cdYard ' yards MsgBox("Units of measure: " & "Yards") thisDoc.UnitIndex = cdFoot ' foots MsgBox("Units of measure: " & "Foots") thisDoc.UnitIndex = cdInch ' inches MsgBox("Units of measure: " & "Inches") thisDoc.UnitIndex = cdMeter ' meters MsgBox("Units of measure: " & "Meters") thisDoc.UnitIndex = cdCm ' centimeters MsgBox("Units of measure: " & "Centimeters") thisDoc.UnitIndex = cdKm ' kilometers MsgBox("Units of measure: " & "Kilometers") thisDoc.UnitIndex = cdMile ' miles MsgBox("Units of measure: " & "Miles") |