Hi Dennis,
The curved line is connected by lost of straight line, so you can find the nearest vertex to get length in the nearest part and then loop other parts of the curved line.
In fact I think the API GetLineOnALine should be helpful.
Regards,
Ethan