Home/ Reference/ Geometry & Transform

shape.Left / .Top / .Right / .Bottom

Edge coordinates. Top > Bottom because Y points up. Children inside a group don't expose these — use GetBoundingBox.

Signature

shape.Left / .Top / .Right / .Bottom

Notes

Edge coordinates. Top > Bottom because Y points up. Children inside a group don't expose these — use GetBoundingBox.

Python example (runnable)

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

print("Left: ", shape.Left)                  # left edge, x
print("Right: ", shape.Right)                 # right edge, x
print("Top: ", shape.Top)                   # top edge, y (numerically larger than Bottom)
print("Bottom: ", shape.Bottom)                # bottom edge, y

print("Width: ", shape.Right - shape.Left)  # subtracting the edges also gives the width

About this section: Geometry & Transform

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

Other entries in this section