API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.GetPosition method
Returns the x y position of the shape range
Syntax:
Sub GetPosition(ByRef PositionX As Double, ByRef PositionY As Double)
Parameters:
Name Type Description
PositionX
Double
PositionY
Double
Remarks:
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.
Examples:
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