API Documentation > CorelDRAW > 2025-v26 > Ellipse > IVGEllipse
Ellipse.GetCenterPosition method
Gets the ellipse center position
Syntax:
Sub GetCenterPosition(ByRef PositionX As Double, ByRef PositionY As Double)
Parameters:
Name Type Description
PositionX
Double
PositionY
Double
Remarks:
The GetCenterPosition method retrieves the coordinates of the center of an ellipse. Using GetCenterPosition is equivalent to getting the values of both CenterX and CenterY properties at the same time.
Examples:
The following VBA example increases the radius of the ellipse both horizontally and vertically by 2". Changing the radius of an ellipse causes its center to move. To preserve the center position of the ellipse, the GetCenterPosition and SetCenterPosition methods are used.
Sub Test()
Dim x As Double, y As Double
Dim rx As Double, ry As Double
With ActiveShape.Ellipse
  .GetCenterPosition x, y
  .GetRadius rx, ry
  .SetRadius rx + 2, ry + 2
  .SetCenterPosition x, y
End With 
End Sub