Combine Line Segments

Is it possible with dynamo to combine multiple line segments into a single segment? Similar to a Poly Line in Autocad. For example, i draw a line that goes around a corner making a 90 degree angle, and creating 2 seperate segments. Would like to have this as one segment. This is causing an issue for me when i am measuring and scheduling the total length of the line.

Something like this ?