Home/ Reference/ Group / Order / Boolean

shapeRange.CreateBoundary()

Creates a boundary — the outer edge of several objects as one curve. Handy for outlines and sticker borders.

Signature

shapeRange.CreateBoundary()

Notes

Creates a boundary — the outer edge of several objects as one curve. Handy for outlines and sticker borders.

Python example (runnable)

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

# draw two shapes with a gap between them
layer.CreateRectangle2(0, 0, 40/25.4, 40/25.4)
layer.CreateRectangle2(80/25.4, 0, 40/25.4, 40/25.4)

for i in range(1, page.Shapes.Count + 1):
    page.Shapes.Item(i).AddToSelection()

try:
    boundary = app.ActiveSelectionRange.CreateBoundary()   # merge the outer boundary into one curve
    boundary.Outline.Width = 2 / 25.4                      # give that outline a stroke
    print("Boundary created")
except Exception as e:
    print("CreateBoundary failed: ", e)

About this section: Group / Order / Boolean

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

Other entries in this section