API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.Unit property
Returns or specifies the unit of measurement used in the document for the position, size, and dimensions of objects
Syntax:
Property Get Unit() As cdrUnit
Property Let Unit(ByVal Value As cdrUnit)
Remarks:
The Unit property returns or specifies the unit of measurement used in the document for position, size, and dimensions of objects.
Examples:
The following VBA example creates a new document, moves the center of coordinates to the center of the page, and creates three circles with radii of 1 mm, 1cm, and 1 inch.
Sub Test()
Dim d As Document
Set d = CreateDocument
d.DrawingOriginX = 0
d.DrawingOriginY = 0
d.Unit = cdrMillimeter
d.ActiveLayer.CreateEllipse2 0, 0, 1
d.Unit = cdrCentimeter
d.ActiveLayer.CreateEllipse2 0, 0, 1
d.Unit = cdrInch
d.ActiveLayer.CreateEllipse2 0, 0, 1 
End Sub