API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.ReverseDirection method
Reverses the node order within the subpath
Syntax:
Sub ReverseDirection()
Remarks:
The ReverseDirection method reverses the direction of a subpath without affecting other subpaths in the curve. This is accomplished by reversing the order of the index numbers associated with the nodes.
Examples:
The following VBA example creates a curve object containing 10 subpaths. It applies end arrowheads to them and then reverses the direction of the third subpath.
Sub Test()
Dim sr As New ShapeRange
Dim s As Shape
Dim n As Long
For n = 1 To 10
  sr.Add ActiveLayer.CreateLineSegment(0, n / 2, 5, n / 2)
Next n
Set s = sr.Combine
s.Outline.EndArrow = ArrowHeads(2)
s.Curve.Subpaths(3).ReverseDirection 
End Sub