Home/ Reference/ Shape Appearance

shape.Locked / .Editable?

Lock state. Unlock before batch-editing, or your changes silently do nothing and no error is raised.

Signature

shape.Locked / .Editable?

Notes

Lock state. Unlock before batch-editing, or your changes silently do nothing and no error is raised.

Python example (runnable)

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

# unlock before bulk edits, or the change silently does nothing
try:
    shape.Locked = False
    print("Unlocked")
except Exception:
    print("This shape has no Locked property")

# put the lock back when you are done
# shape.Locked = True

About this section: Shape Appearance

Shape Appearance — outline, fill and transparency shortcuts.

Other entries in this section