Home/ Reference/ Group / Order / Boolean

shape.OrderToFrontOf(other) / .OrderToBackOf(other)

Place above or below another object. More reliable than counting layers.

Signature

shape.OrderToFrontOf(other) / .OrderToBackOf(other)

Notes

Place above or below another object. More reliable than counting layers.

Python example (runnable)

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

target = page.Shapes.Item(1)             # the reference shape
shape  = page.Shapes.Item(2)             # the shape to move

shape.OrderToFrontOf(target)             # move just above target
print("Moved above the first shape")

shape.OrderToBackOf(target)              # move just below target
print("Moved below the first shape")

About this section: Group / Order / Boolean

Group / Order / Boolean — grouping, ordering and boolean operations.

Other entries in this section