shape.Curve.SubPaths
The sub-path collection. A shape with several separate runs of line has several sub-paths. Knockout lettering and logos with holes are all multi-subpath.
Signature
shape.Curve.SubPaths
Notes
The sub-path collection. A shape with several separate runs of line has several sub-paths. Knockout lettering and logos with holes are all multi-subpath.
Python example (runnable)
Requires
pywin32. The example assumes app / doc / page / layer are already connected.
See Connection & InitPython
shape = app.ActiveSelectionRange(1)
shape.ConvertToCurves()
c = shape.Curve
print("Subpaths: ", c.SubPaths.Count)
for i in range(1, c.SubPaths.Count + 1):
sp = c.SubPaths.Item(i)
print("#", i, " subpaths, nodes: ", sp.Nodes.Count)
About this section: Curve & Node
Curve & Node — subpaths and nodes.
- This section has 8 entries; this is one of them.
- See the full section index: Curve & Node
Other entries in this section
- shape.CurveEntry point to the curve sub-object. Rectangles are 1, ellipses 2, gro
- shape.Curve.Nodes.CountTotal node count for the shape. When you're checking node reduction th
- node.PositionX / node.PositionYOne node's coordinates, read/write. Values are in document coordinates
- shape.Curve.Length / Area / ClosedCurve length, enclosed area, whether it closes. Cut lines, material es
- shape.Curve.Segments.CountSegment count. The relationship is segment count = node count minus su
- subpath.ReverseDirection()Reverses path direction. Inside/outside tests, holes, and boolean resu
- subpath.GetCopy() / subpath.Delete()Copies a sub-path out as a standalone Shape, or deletes the part you d