API Documentation > CorelDRAW > 2025-v26 > Node > IVGNode
Node.Delete method
Removes this node from the curve
Syntax:
Sub Delete()
Remarks:
The Delete method breaks a subpath at the specified node by removing a node from the curve. If you delete a node from a segment that contains two nodes, the whole segment is removed.
Examples:
The following VBA example deletes all cusp nodes in the curve.
Sub Test()
Dim s As Shape
Dim n As Node
Dim i As Long, Num As Long
Set s = ActiveShape
If s.Type <> cdrCurveShape Then Exit Sub
  Num = s.Curve.Nodes.Count
  i = 1
  While i <= Num

 Set n = s.Curve.Nodes(i)

 If n.Type = cdrCuspNode Then


If n.SubPath.Nodes.Count = 2 Then


  ' Deleting a node from a segment containing only 2 nodes


  ' will remove the whole segment. If we are deleting the last


  ' node of the subpath, then we must move one more step back.


  If n.SubPath.EndNode Is n Then i = i - 1



 n.Delete



 Num = Num - 2



 i = i - 1


  Else



 ' Just delete the node and adjust the number of nodes left.



 n.Delete



 Num = Num - 1



 i = i - 1


  End If


End If


i = i + 1

 Wend
  
End Sub