Home/ Reference/ Document

doc.ActiveLayer

The active layer of the current page.

Signature

doc.ActiveLayer

Notes

The active layer of the current page.

Python example (runnable)

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

rect = layer.CreateRectangle2(0, 0, 100, 50)   # every Create call hangs off layer
print("Rectangle drawn")

About this section: Document

Document — documents and file handling.

Other entries in this section