Object Model Reference : Classes : N : NodeRange : Properties : NodeRange.PositionY |
Property PositionY As Double
Member of NodeRange
The PositionY property returns the vertical position of the bounding box that encloses all nodes in a node range. This position is relative to the documents reference point and is measured in document units.
• |
The value of PositionY is 0 if there are no nodes in the node range.
|
The PositionY property returns a read-only value.
The following VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.