Home/ Reference/ Application

app.ActiveSelectionRange

With no argument it returns the whole selection as a ShapeRange. Iterate it with for s in rng.

Signature

app.ActiveSelectionRange

Notes

With no argument it returns the whole selection as a ShapeRange. Iterate it with for s in rng.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
rng = app.ActiveSelectionRange          # no argument = the whole selection (ShapeRange)
print("Selected: ", rng.Count)

for i in range(1, rng.Count + 1):
    s = rng.Item(i)                     # s : the i-th selected shape
    print(i, "type", s.Type)

About this section: Application

Application — the CorelDRAW application object.

Other entries in this section