API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.Segments property
Gets the collection of segments within the subpath
Syntax:
Property Get Segments() As Segments
Remarks:
The Segments property returns a Segments collection, which contains all the segments of a subpath.
Examples:
The following VBA example converts, to lines, all segments in the first subpath.
Sub Test()
Dim seg As Segment
For Each seg In ActiveShape.Curve.Subpaths(1).Segments
  seg.Type = cdrLineSegment
Next seg 
End Sub