Home/ Reference/ Align / Distribute

shape.AlignToPage(AlignType)

Aligns to the page. The batch-layout workhorse: align everything left, then everything centered, and it lands far more accurately than dragging.

Signature

shape.AlignToPage(AlignType)

Notes

Aligns to the page. The batch-layout workhorse: align everything left, then everything centered, and it lands far more accurately than dragging.

Python example (runnable)

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

for i in range(1, shapes.Count + 1):
    shapes.Item(i).AlignToPage(3)                   # 3 = centre horizontally

print("All centred horizontally on the page")

About this section: Align / Distribute

Align / Distribute — align, distribute and transform.

Other entries in this section