API Documentation > CorelDRAW > 2025-v26 > Node > IVGNode
Node.SetPosition method
Sets the horizontal and vertical position of the node on the page
Syntax:
Sub SetPosition(ByVal PositionX As Double, ByVal PositionY As Double)
Parameters:
Name Type Description
PositionX
Double
PositionY
Double
Remarks:
The SetPosition method moves a node to the specified x- and y-coordinates. The GetPosition method returns the x- and y-coordinates of a node.
Examples:
The following VBA example distorts the selected curve. The amount of distortion depends on the distance between the node and the center of the shape. The node is moved only radially.
Sub Test()
Dim s As Shape
Dim n As Node
Dim xc As Double, yc As Double
Dim r As Double
Dim dx As Double, dy As Double
Const Amplitude As Double = 0.2
Set s = ActiveShape
If s.Type = cdrCurveShape Then
  ActiveDocument.ReferencePoint = cdrCenter
  s.GetPosition xc, yc
  For Each n In s.Curve.Nodes

 dx = n.PositionX - xc

 dy = n.PositionY - yc

 r = Exp((Rnd() - 0.5) * Amplitude)

 n.SetPosition xc + dx * r, yc + dy * r
  Next n
End If 
End Sub