Home/ Reference/ Geometry & Transform

shape.PositionX / .PositionY

Bottom-left corner. Reading and writing these directly is one call cheaper than SetPosition.

Signature

shape.PositionX / .PositionY

Notes

Bottom-left corner. Reading and writing these directly is one call cheaper than SetPosition.

Python example (runnable)

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

print("X:", shape.PositionX)              # bottom-left x
print("Y:", shape.PositionY)              # bottom-left y

shape.PositionX = 20 / 25.4                # assigning X moves it horizontally
print("X after move: ", shape.PositionX)

About this section: Geometry & Transform

Geometry & Transform — position, size and rotation of shapes.

Other entries in this section