Home/ Reference/ Curve & Node

shape.Curve

Entry point to the curve sub-object. Rectangles are 1, ellipses 2, groups 7 — none of those are curves; call ConvertToCurves() first.

Signature

shape.Curve

Notes

Entry point to the curve sub-object. Rectangles are 1, ellipses 2, groups 7 — none of those are curves; call ConvertToCurves() first.

Python example (runnable)

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

if shape.Type != 3:
    print("Not a curve (type ", shape.Type, "), convert it first")
    shape.ConvertToCurves()

curve = shape.Curve
print("Total nodes: ", curve.Nodes.Count)
print("Subpaths: ", curve.SubPaths.Count)

About this section: Curve & Node

Curve & Node — subpaths and nodes.

Other entries in this section