Home/ Reference/ Effects

shape.CreateLens(Type)

Lens: drops a piece of filter glass on the shape so whatever sits beneath it changes color or shape live. Magnifiers, color masks.

Signature

shape.CreateLens(Type)

Notes

Lens: drops a piece of filter glass on the shape so whatever sits beneath it changes color or shape live. Magnifiers, color masks.

Python example (runnable)

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

try:
    eff = shape.CreateLens(1)                       # 1 = one of the common lens types
    print("Lens created, type: ", eff.Type)
    print("Lens parameters: ", eff.Lens)
except Exception as e:
    print("Lens failed; the type code may differ in your version: ", e)

About this section: Effects

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

Other entries in this section