API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.SetRotationCenter method
Sets the rotation center of the shape range
Syntax:
Sub SetRotationCenter(ByVal x As Double, ByVal y As Double)
Parameters:
Name Type Description
x
Double
y
Double
Remarks:
The SetRotationCenter method sets the x- and y-coordinates of the center of rotation for a shape range. See also the ShapeRange.RotationCenterX and ShapeRange.RotationCenterY properties.
Examples:
The following VBA example rotates all rectangles by 45°. The rectangles are rotated relative to the center of the page.
Sub Test()
Dim sr As ShapeRange
Set sr = ActivePage.FindShapes(, cdrRectangleShape)
sr.SetRotationCenter ActivePage.SizeWidth / 2, ActivePage.SizeHeight / 2
sr.Rotate 45 
End Sub