Home/ Reference/ Object Data

shape.PowerClipParent / shape.Layer / shape.Page

Walks back up: which frame clips this object, which layer, which page. Before cleaning up a messy file, map the hierarchy first.

Signature

shape.PowerClipParent / shape.Layer / shape.Page

Notes

Walks back up: which frame clips this object, which layer, which page. Before cleaning up a messy file, map the hierarchy first.

Python example (runnable)

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

print("On page: ", shape.Page.Name)
print("On layer: ", shape.Layer.Name)
print("Parent group: ", shape.ParentGroup)

try:
    pc = shape.PowerClipParent                      # only has a value inside a container
    print("Clipped inside: ", pc.Name)
except Exception:
    print("No frame parent, so it is not inside a PowerClip")

About this section: Object Data

Object Data — object data and document properties.

Other entries in this section