直线,多义线,圆弧连接lisp
dragon_1980
2008年12月25日 12:08:33
只看楼主

(defun c:lj( / ss i ename endata entype)(princ "\n请选择需要连接的线段: ")(setq ss (ssget '((0 . "LINE,LWPOLYLINE,ARC"))))(setq i 0)(repeat (sslength ss) (setq ename (ssname ss i)) (setq endata (entget ename))

(defun c:lj( / ss i ename endata entype)
(princ "\n请选择需要连接的线段: ")
(setq ss (ssget '((0 . "LINE,LWPOLYLINE,ARC"))))
(setq i 0)
(repeat (sslength ss)
(setq ename (ssname ss i))
(setq endata (entget ename))
(setq entype (cdr (assoc 0 endata)))
(if (= entype "LWPOLYLINE")
(setq i (+ i 1))
)
)
(if (= i (sslength ss))
(command ".pedit" "" "m" ss "" "j" 0 enter)
(command ".pedit" "" "m" ss "" "y" "j" 0 enter)
)
(princ)
)

[ 本帖最后由 dragon_1980 于 2008-12-29 11:17 编辑 ]
免费打赏

相关推荐

APP内打开