API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.GetPosition method
Gets the horizontal and vertical position of the subpath's head on the page
Syntax:
Sub GetPosition(ByRef PositionX As Double, ByRef PositionY As Double)
Parameters:
Name Type Description
PositionX
Double
PositionY
Double
Remarks:
The GetPosition method returns the horizontal and vertical positions of a subpath head, treating the subpath a separate object.
Examples:
The following VBA example draws a bounding rectangle around each subpath in the selected curve.
Sub Test()
Dim sp As SubPath
Dim x As Double, y As Double
ActiveDocument.ReferencePoint = cdrBottomLeft
For Each sp In ActiveShape.Curve.Subpaths
  sp.GetPosition x, y
  ActiveLayer.CreateRectangle2 x, y, sp.SizeWidth, sp.SizeHeight
Next sp 
End Sub