Home/ Reference/ Layer Advanced

layer.Visible / layer.Printable / layer.Editable

Three layer switches: visible, printable, editable. Locking a layer means Editable = False, which protects backgrounds from both the script and a stray click.

Signature

layer.Visible / layer.Printable / layer.Editable

Notes

Three layer switches: visible, printable, editable. Locking a layer means Editable = False, which protects backgrounds from both the script and a stray click.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
layer = doc.ActivePage.ActiveLayer

print("Visible: ", layer.Visible)
print("Printable: ", layer.Printable)
print("Editable: ", layer.Editable)

layer.Editable = False                              # lock it against stray edits
print("Locked: ", layer.Editable)

layer.Editable = True                               # unlock afterwards

About this section: Layer Advanced

Layer Advanced — multi-layer and multi-page workflows.

Other entries in this section