API Documentation > CorelDRAW > 2025-v26 > SnapPoint > IVGSnapPoint
SnapPoint.PositionX property
Gets or sets the SnapPoint's X coordinate
Syntax:
Property Get PositionX() As Double
Property Let PositionX(ByVal Value As Double)
Remarks:
The PositionX property returns or specifies the horizontal position of a snap point. If the point is on a shape, its position cannot be changed.
Examples:
The following VBA example creates a star and attaches a connector line to its center. The other end of the connector line is placed on the page at the coordinates (1", 2").
Sub Test()
Dim s1 As Shape, sCon As Shape
Dim sp As New SnapPoint
Set s1 = ActiveLayer.CreatePolygon(1.6, 10, 4.5, 7, 5, 1, 2)
sp.PositionX = 1
sp.PositionY = 2
Set sCon = ActiveLayer.CreateConnector(s1.SnapPoints(2), sp) 
End Sub