Home/ Reference/ Group / Order / Boolean

shape.Shapes

Child shapes inside a group or container. Recurse through them to reach the bottom.

Signature

shape.Shapes

Notes

Child shapes inside a group or container. Recurse through them to reach the bottom.

Python example (runnable)

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

# walk every group on the page and read its members
groups = page.FindShapes("", 7, True)      # 7 = group
print("Groups: ", groups.Count)

for i in range(1, groups.Count + 1):
    g = groups.Item(i)                      # g : the i-th group
    print("Group", i, "contains", g.Shapes.Count, " member(s)")
    for k in range(1, g.Shapes.Count + 1):
        print("   member", k, "type", g.Shapes.Item(k).Type)

About this section: Group / Order / Boolean

Group / Order / Boolean — grouping, ordering and boolean operations.

Other entries in this section