Home/ Reference/ Curve & Node

shape.Curve.Segments.Count

Segment count. The relationship is segment count = node count minus sub-path count; when it doesn't add up, the curve has a break in it.

Signature

shape.Curve.Segments.Count

Notes

Segment count. The relationship is segment count = node count minus sub-path count; when it doesn't add up, the curve has a break in it.

Python example (runnable)

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

c = shape.Curve
print("Subpath: ", c.SubPaths.Count)
print("Nodes: ", c.Nodes.Count)
print("Segments: ", c.Segments.Count)

About this section: Curve & Node

Curve & Node — subpaths and nodes.

Other entries in this section