ConvertCurveToPolyline problem

You can use this method: