API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.FindSegmentOffset method
Finds Segment Offset
Syntax:
Function FindSegmentOffset(ByVal AbsoluteOffset As Double, ByRef Segment As Segment, ByRef ParamOffset As Double, Optional ByRef Remainder As Double = 0) As Boolean
Parameters:
Name Type Description
AbsoluteOffset
Double
Segment
ParamOffset
Double
Remainder
Double
Specifies the value of the remainder.
Remarks:
The FindSegmentOffset method finds the offset of a specified point on a segment subpath. If the offset is longer than the length of the subpath, the function returns False, and the remaining offset is returned in the Remainder parameter. Otherwise, the function returns True, and the ParamOffset parameter returns the parametric offset for the subpath.
Examples:
The following VBA example finds the segment that contains a point 3" from the beginning of the first subpath, and it then converts the segment to a line.
Sub Test()
Dim seg As Segment
Dim t As Double
If ActiveShape.Curve.Subpaths(1).FindSegmentOffset(3, seg, t) Then
  seg.Type = cdrLineSegment
Else
  MsgBox "The first subpath is less than 3"" long."
End If 
End Sub