API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.GetPointPositionAt method
Gets the coordinates of a point located on the subpath
Syntax:
Sub GetPointPositionAt(ByRef x As Double, ByRef y As Double, Optional ByVal Offset As Double = 0.5, Optional ByVal OffsetType As cdrSegmentOffsetType = cdrRelativeSegmentOffset)
Parameters:
Name Type Description
x
Double
y
Double
Offset
Double
Specifies, in document units, the offset distanceof the point
OffsetType
Specifies, in document units, the offset type of the point, and returns cdrSegmentOffsetType.
Remarks:
The GetPointPositionAt method returns the coordinates of a point on a curve's subpath.
Examples:
The following VBA example creates five small ellipses distributed evenly along each subpath of the selected curve.
Sub Test()
Dim sp As SubPath
Dim t As Double, x As Double, y As Double
For Each sp In ActiveShape.Curve.SubPaths
  For t = 0 To 0.9 Step 0.1

 sp.GetPointPositionAt x, y, t, cdrRelativeSegmentOffset

 ActiveLayer.CreateEllipse2 x, y, 0.03
  Next t
Next sp 
End Sub