Home/ Reference/ Group / Order / Boolean

shapeRange.Weld(other)

Weld: fuses the shapes into one outline.

Signature

shapeRange.Weld(other)

Notes

Weld: fuses the shapes into one outline.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
# boolean work needs both shapes selected
page  = doc.ActivePage
layer = page.ActiveLayer

r1 = layer.CreateRectangle2(0, 0, 50/25.4, 50/25.4)
r2 = layer.CreateRectangle2(30/25.4, 0, 50/25.4, 50/25.4)
r1.AddToSelection()
r2.AddToSelection()

rng = app.ActiveSelectionRange
try:
    rng.Weld()                 # weld: merge both outlines into one
    print("Welded, shapes left: ", app.ActiveSelectionRange.Count)
except Exception as e:
    print("Boolean call differs in this version: ", e)

About this section: Group / Order / Boolean

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

Other entries in this section