Home/ Reference/ Effects

shape.CreateBlend(target_shape)

Blend: generates a run of intermediate objects between two shapes. The step count is eff.Blend.NumberOfSteps. Ten times faster than placing a gradient of objects by

Signature

shape.CreateBlend(target_shape)

Notes

Blend: generates a run of intermediate objects between two shapes. The step count is eff.Blend.NumberOfSteps. Ten times faster than placing a gradient of objects by hand.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shapes = app.ActiveSelectionRange
if shapes.Count < 2:
    raise SystemExit("Select two shapes first")

src = shapes.Item(1)
dst = shapes.Item(2)

eff = src.CreateBlend(dst)                          # blend between two shapes
try:
    eff.Blend.NumberOfSteps = 8                     # 8 intermediate objects
    print("Blend steps: ", eff.Blend.NumberOfSteps)
except Exception as e:
    print("Changing the step count failed: ", e)

About this section: Effects

Effects — drop shadow, blend, contour, extrude and lens.

Other entries in this section