Previous Document Next Document
NodeRange.PositionX

Property PositionX As Double

Member of NodeRange

The PositionX property returns the horizontal position of the bounding box that encloses all of the nodes in the node range. The position is relative to the document’s reference point and is measured in document units.

It is important to note that PositionX and PositionY are always 0 if there are no nodes in the node range.

The PositionX property returns a read-only value.

The following code example draws a rectangle around the selected nodes:

Sub Test() 
 Dim nr As NodeRange 
 Dim x1 As Double, y1 As Double 
 Dim x2 As Double, y2 As Double 
 Set nr = ActiveShape.Curve.Selection 
 ActiveDocument.ReferencePoint = cdrTopLeft 
 x1 = nr.PositionX 
 y1 = nr.PositionY 
 ActiveDocument.ReferencePoint = cdrBottomRight 
 x2 = nr.PositionX 
 y2 = nr.PositionY 
 ActiveLayer.CreateRectangle x1, y1, x2, y2 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.