Previous Document Next Document

Object Model Reference : Classes : D : DimensionLinear : Properties : DimensionLinear.Units


DimensionLinear.Units

Property Units As cdrDimensionLinearUnits

Description

Member of DimensionLinear

The Units property specifies the unit of measurement for a dimension value. The default value is the same as the unit of measure for the parent document.

For the dimension unit to be displayed, the Dimension.ShowUnits property must be set to True.

VBA example

The following VBA example creates a rectangle and a linear dimension that is linked to the rectangle’s snap points. The unit of measure is millimeters.

Sub Test()
Dim shp1 As Shape, shp2 As Shape
Set shp1 = ActiveLayer.CreateRectangle2(0, 0, 100, 50)
Set shp2 = ActiveLayer.CreateLinearDimension(cdrDimensionHorizontal, _
shp1.SnapPoints(1), shp1.SnapPoints(3))
shp2.Dimension.Linear.Units = cdrDimensionUnitMillimeters
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.