Q... is on the money, and remember
1) All line segments must be in the same plane (some jokers use the z coordidnate, there is a way the force all z coordinates to zero but I forgot how)
2) All line segments must meet at endpoints (fillet with radius=0)
3) If you have two line segments, exactly overlaying each other and you join both of them to the polyline by using "crossing", both segments will be joined and your polyline will go from point "A" to point "B" and back to "A" again.
4) You might consider setting "osnap" to endpoint and intersection and just quickly retracing the line.