Having probs with the join lsp again .... I am getting an error and the lines wont join. It works sometimes and others it doesn't work... sometimes if you do it enough times it will eventually work. Is there a way to leave out where it references the ucs? the error is: This object does not define a coordinate system ; error: Function cancelled the code is: (defun c:J () (setq polyset (ssget)) (setq newents (ssadd)) (setq n 0) (while (setq poline (ssname polyset n)) (setq polent (cdr (assoc 0 (entget poline)))) (if (or (= polent "LINE")(= polent "ARC")) (progn (command "UCS" "E" poline) (command "pedit" poline "y" "") (command "UCS" "P") (ssadd (entlast) newents) ) (ssadd poline newents) ) (setq n (1+ n)) );end while (setq cn 0) (while (setq newpline (ssname newents cn)) (if (entget newpline) (progn (command "UCS" "E" newpline) (command "pedit" newpline "j" newents "" "") (command "UCS" "P") (setq cn (1+ cn)) ) (setq cn (1+ cn)) ) ) (princ) )