The included list joins lines to polylines.
Since I am forced to use R2008 it doesn't work. It worked great in R2002 but as I said not now.
;;;;8:18 AM 05/09/2008 theexchange
;;The user selects a line, arc or polyline and then several lines, arcs or polylines and then the function joins all that touch into one polyline.
(defun c:JP (/ EntType SS)
(princ "\nSelect lines, arcs or polylines to be joined into a polyline.")
(if (setq SS (ssget))
(progn
(setq EntType (cdr (assoc 0 (entget (ssname SS 0)))))
(if (or (= EntType "LINE")(= EntType "ARC"))
(command ".PEDIT" SS "Y" "J" SS "" "X")
)
(if (or (= EntType "POLYLINE")(= EntType "LWPOLYLINE"))
(command ".PEDIT" SS "J" SS "" "X")
)
)
(princ "\nNo lines, arcs or polylines selected.")
)
(princ)
)