(DEFUN C:PU()
        (command "purge" "a" "" "n")            
              (command "qsave") (princ "\n垃圾以清除,存檔OK!")(princ)) 
   
(DEFUN C:aJ()(princ "\n請選擇要串聯的圖形:")(princ)(SETQ SS(SSGET))(COMMAND"PEDIT"ss "Y" "J" "p" "" ""))




(defun c:PJ (/ s)
  (setq s (ssget))
  (if (> (sslength s) 1)
      (command "PEDIT" s "" "J" s "" "")
   ) (princ)
)


(defun c:PE()     
     (setq ss (ssget))
     (if (/= ss nil)
      (progn
        (setq nn (sslength ss))
        (setq i 0)
        (repeat nn
          (setq sname (ssname ss i))
          (setq en1 (entget sname))
          (setq en2 (cdr (assoc 0 (entget sname))))
          (if (and (/= en1 nil) (or (= en2 "LINE") (= en2 "ARC") (and (= en2 "LWPOLYLINE") (= (cdr (assoc 70 (entget sname))) 0))))
           (progn
            (setq en(cdr (assoc 0 (entget sname))))
            (if (or (= en "LWPOLYLINE") (= en "POLYLINE"))
               (command "pedit" sname "j" ss "" "")
               (command "pedit" sname "y" "j" ss "" "")
             );if
           (setq i (+ i 1))
         );progn
         
      (setq i (+ i 1))
         );if
        
         );repeat
     );progn 
   );if
)

            
              (command "qsave") 