![]() |
![]() |
Document.Unit
Property Unit As cdrUnit
Member of Document
The Unit property returns or sets the unit of measurement used in the document for position, size, and dimensions of objects.
The following code 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
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.