Home/ Reference/ Application

app.ActiveLayer

The active layer. Shorthand for ActiveDocument.ActivePage.ActiveLayer.

Signature

app.ActiveLayer

Notes

The active layer. Shorthand for ActiveDocument.ActivePage.ActiveLayer.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
layer = app.ActiveLayer                 # active layer of the active page
print("Layer name: ", layer.Name)
print("Shapes on this layer: ", layer.Shapes.Count)

About this section: Application

Application — the CorelDRAW application object.

Other entries in this section