Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.GetPosition |
Sub GetPosition(PositionX As Double, PositionY As Double)
Member of ShapeRange
The GetPosition method retrieves the horizontal and vertical positions of all the shapes in a shape range, treating the range as a single object.
• |
The position of the shape range is set relative to the reference point specified
by the Document.ReferencePoint property.
|
Parameter
|
Description
|
PositionX
|
Specifies, in document units, the horizontal position of the shape range
|
PositionY
|
Specifies, in document units, the vertical position of the shape range
|
The following VBA example creates an ellipse with the dimensions of the active selection range.
Sub Test() |
Dim x As Double, y As Double |
ActiveDocument.ReferencePoint = cdrCenter |
ActiveSelectionRange.GetPosition x, y |
ActiveLayer.CreateEllipse2 x, y, 0.05 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.