API Documentation > CorelDRAW > 2025-v26 > Segments > IVGSegments
Segments.Count property
Gets the number of segments in the segment collection
Syntax:
Property Get Count() As Long
Remarks:
The Count property returns the number of segments in a Segments collection.
Examples:
The following VBA example displays the number of nodes, segments, and subpaths in the active curve.
Sub Test()
Dim crv As Curve
Set crv = ActiveShape.Curve
MsgBox "The curve contains:" & vbCr & _
  "Nodes: " & crv.Nodes.Count & vbCr & _
  "Segments: " & crv.Segments.Count & vbCr & _
  "Subpaths: " & crv.Subpaths.Count 
End Sub