API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.Index property
Gets the index of the subpath within its curve
Syntax:
Property Get Index() As Long
Remarks:
The Index property returns the index number of a curve's subpath.
Examples:
The following VBA example place a number next to each subpath.
Sub Test()
Dim spath As SubPath
Dim x As Double, y As Double, a As Double
Dim s As Shape
For Each spath In ActiveShape.Curve.SubPaths
  spath.GetPointPositionAt x, y, 0.5, cdrRelativeSegmentOffset
  a = spath.GetPerpendicularAt(0.5, cdrRelativeSegmentOffset)
  If a < 0 Or a > 180 Then a = a + 180

 a = a * 3.1415926 / 180

 x = x + 0.2 * Cos(a)

 y = y + 0.2 * Sin(a)

 Set s = ActiveLayer.CreateArtisticText(x, y, CStr(spath.Index))

 With s.Text


.AlignProperties.Alignment = cdrCenterAlignment


.FontProperties.Name = "Arial"


.FontProperties.Size = 18

 End With
  Next spath

End Sub