API Documentation > CorelDRAW > 2025-v26 > DimensionLinear > IVGDimensionLinear
DimensionLinear.Units property
Specifies the unit of measurement for the number
Syntax:
Property Get Units() As cdrDimensionLinearUnits
Property Let Units(ByVal Value As cdrDimensionLinearUnits)
Remarks:
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.
Examples:
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