How do I create a polyline in Draw

I want to create a polyline by joining existing lines.

There is a tool to break a polygon (may be “open”) into its single lines, but I don’t know a tool to join lines.

If you enable “Snap to Object Points” you can first make sure by dragging that each next line actually starts exactly at the end of the previous one. Then you can retrace the joint line as a polygon. The original parts may be deleted later. Thius will work staisfyingly for straight lines if there aren’t too many parts.

To join lines by user code may not be exactly easy because a multiselection of shapes does not know (give access to) the order the single shapes were selected in.

You might be able to use Libre CAD