API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.Selection method
Creates a range containing all the select nodes on this subpath
Syntax:
Function Selection() As NodeRange
Remarks:
The Selection method returns a node range (or NodeRange object) containing all the selected nodes on a subpath. The Shape tool must be selected.
Examples:
The following VBA example displays the number of nodes selected in the first subpath of the active curve.
Sub Test()
Dim nr As NodeRange
Set nr = ActiveShape.Curve.Subpaths(1).Selection
MsgBox "There are " & nr.Count & " nodes selected in the first subpath" 
End Sub