Previous Document Next Document

Object Model Reference : Classes : D : Document : Properties : Document.Unit


Document.Unit

Property Unit As cdrUnit

Description

Member of Document

The Unit property returns or specifies the unit of measurement used in the document for position, size, and dimensions of objects.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.