API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.AddNodeAt method
Inserts a node on the segment
Syntax:
Function AddNodeAt(Optional ByVal Offset As Double = 0.5, Optional ByVal OffsetType As cdrSegmentOffsetType = cdrRelativeSegmentOffset) As Node
Parameters:
Name Type Description
Offset
Double
Specifies the offset distance, in document units, of the new node. 5.
OffsetType
Specifies the offset type, and returns cdrSegmentOffsetType.
Remarks:
The AddNodeAt method inserts a node at a given point on a subpath. An absolute or relative offset from the beginning of the subpath can be specified.
Examples:
The following VBA example adds a new node to the middle of each subpath.
Sub Test()
Dim sp As SubPath
For Each sp In ActiveShape.Curve.Subpaths
  sp.AddNodeAt 0.5, cdrRelativeSegmentOffset
Next sp 
End Sub