Kent Elrod shares a trick using the Fillet command in AutoCAD to trim and join separate polylines (or plines).
"I found that the Fillet command can work with plines in unexpected, but good, ways. If you have a multiple-segment pline and a line or pline that is separate from that, you can use Fillet to join them, but this isn't the normal Fillet where you pick the closest segment to the separate segment. You can pick the second segment and the separate segment — the shorter first segment is gone and a single longer segment is added to the pline.
"In another example, a pline has an angled end segment and a separate segment at an angle to the second segment. Use Fillet to pick the second segment and the separate pline (or line), and the first angled segment is removed and the separate pline is now attached to the longer pline (see the image below).
"You can use any segment of the multiple-segment pline with Fillet, and when you pick the separate pline all the other segments are removed."
Notes from Cadalyst Tip Patrol: This can get confusing, but refer to the image below (or download a larger version of the same image with the "Download This Tip" button above). The tipster is using the Fillet command with a radius of zero. This will extend and/or trim the two filleted lines, and join them if they are polylines. This tip uses the Fillet command to trim, extend, and join polylines, but not at the nearest segments of the polylines. The tipster demonstrates that the command will trim the polyline at the segment that is selected, even if it isn't the last segment.