API Documentation > CorelDRAW > 2025-v26 > NodeRange > IVGNodeRange
NodeRange.Count property
Gets the number of nodes in the range
Syntax:
Property Get Count() As Long
Remarks:
The Count property returns the number of nodes in a node range (or NodeRange object).
Examples:
The following VBA example displays the number of nodes selected with the Shape tool.
Sub Test()
Dim nr As NodeRange
Set nr = ActiveShape.Curve.Selection
MsgBox nr.Count & " node(s) selected in the curve" 
End Sub Sub Test()
Dim nr As New NodeRange
Dim n As Node
Dim ret As VbMsgBoxResult
For Each n In ActiveShape.Curve.Nodes
  If n.Type = cdrCuspNode Then nr.Add n
  Next n
  If nr.Count = 0 Then

 MsgBox "No cusp nodes found"
  Else

 ret = MsgBox(nr.Count & " cusp nodes found. Do you want to delete them?", vbYesNo)

 If ret = vbYes Then nr.Delete

 End If
  
End Sub