Home/ Reference/ Align / Distribute

shape.SetRotationCenter(X, Y)

Sets the rotation center. Put it at the page center and rotate in a loop and you have radial layout — corner marks, petal arrangements, minimal code.

Signature

shape.SetRotationCenter(X, Y)

Notes

Sets the rotation center. Put it at the page center and rotate in a loop and you have radial layout — corner marks, petal arrangements, minimal code.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)

shape.SetRotationCenter(page.CenterX, page.CenterY)  # centre it on the page
print("Rotation centre: ", shape.RotationCenterX, shape.RotationCenterY)

for i in range(6):                                   # copy every 60 degrees
    dup = shape.Duplicate(0, 0)
    dup.Rotate(60 * (i + 1))
print("Six copies placed around the page centre")

About this section: Align / Distribute

Align / Distribute — align, distribute and transform.

Other entries in this section