Home/ Reference/ Geometry & Transform

shape.Duplicate(dx, dy)

Copies with an offset; dx and dy are the offset.

Signature

shape.Duplicate(dx, dy)

Notes

Copies with an offset; dx and dy are the offset.

Python example (runnable)

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

# Duplicate(dx, dy): copy with an offset
dup = shape.Duplicate(30 / 25.4, 0)
print("Copy position: ", dup.PositionX, dup.PositionY)

# make 5 copies, each 30mm to the right
for i in range(5):
    shape.Duplicate(30 / 25.4, 0)

About this section: Geometry & Transform

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

Other entries in this section