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 & InitPython
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.
- This section has 11 entries; this is one of them.
- See the full section index: Shape Appearance
Other entries in this section
- shape.FillThe fill object. See the Fill section.
- shape.OutlineThe outline object. See the Outline section.
- shape.RectangleThe rectangle sub-object, which owns the corners: .CornerType (0 = squ
- shape.TransparencyTransparency: .ApplyTransparency(type, start, end), or set .Transparen
- shape.EffectsThe effects collection — drop shadow, extrude, contour, envelope, pers
- shape.ShadowShadow properties.
- shape.LensLens (magnify, fisheye, color transform and so on).
- shape.TextThe text object. See the Text section. Accessing it on a non-text shap