(defun c:ab(/ kst sset i pp d1 yn f1) (setvar "cmdecho" 0) (princ "\n选择欲连接的所有二维多义线、圆弧、直线:")(setq sset (ssget '((-4 . " "))) i 0) (while (< i (sslength sset)) (if (entget (setq ent (ssname sset i)))
(setvar "cmdecho" 0)
(princ "\n选择欲连接的所有二维多义线、圆弧、直线:")(setq sset (ssget '((-4 . "
(while (< i (sslength sset))
(if (entget (setq ent (ssname sset i)))
(if (= (cdr (assoc 0 (entget ent))) "LWPOLYLINE") (vl-cmdf "_PEDIT" ent "J" ent "" "") (vl-cmdf "_PEDIT" ent "Y" "J" sset "" ""))
)
(setq i (1+ i))
)
(princ)
)
本程序可以连接L与L,L与PL、PL与ARC、L与ARC,但不能连接PL与PL,请各位高手帮忙啊。让它能连接PL与PL。