API Documentation > CorelDRAW > 2025-v26 > Node > IVGNode
Node.Previous method
Gets the node preceding this one
Syntax:
Function Previous() As Node
Remarks:
The Previous method returns the preceding node in a curve, relative to the given node.
Examples:
The following VBA example creates a curve with six segments, finds the first symmetrical node, and displays the index number of the node preceding the first symmetrical node.
Sub Test()
Dim s As Shape
Dim n As Node
Dim sp As SubPath
Dim crv As Curve
Set crv = CreateCurve(ActiveDocument)
ActiveDocument.ReferencePoint = cdrBottomLeft
Set sp = crv.CreateSubPath(1, 1)
sp.AppendLineSegment 1, 1
sp.AppendCurveSegment 3, 3
sp.AppendCurveSegment 5, 1
sp.AppendCurveSegment 6, 4
sp.AppendCurveSegment 8, 2
sp.AppendLineSegment 10, 5
sp.Nodes(2).Type = cdrSmoothNode
sp.Nodes(3).Type = cdrSmoothNode
sp.Nodes(4).Type = cdrSymmetricalNode
sp.Nodes(5).Type = cdrSmoothNode
Set s = ActiveLayer.CreateCurve(crv)
For Each n In s.Curve.Nodes
  If n.Type = cdrSymmetricalNode Then

 Set n = s.Curve.Nodes.Item(n.Index).Previous

 Exit For
  End If
Next n
MsgBox n.Index 
End Sub