Changing Polylines to one straight line

How can i change polylines to one straight line ? My cnc sees these points as starts and stops. Thanks for the help