tryhi 发表于 2015-9-20 20:47:03

相邻多段线合并

本帖最后由 tryhi 于 2015-9-29 13:26 编辑

(defun c:tt ()
(setq ss(ssget '((0 . "*line"))))
(setq $i -1)
(setq ssd (ssadd))
(repeat (sslength ss)
    (setq $i (1+ $i))
    (command "REGION" (ssname ss $i) "")
    (setq ssd (ssadd (ssname(ssget "L")0) ssd))
)
(command "_union" ssd "")
(setq ss (ssget "L"))
(command "_explode"ss "")
(setq ss (ssget "P"))
(pex ss)
)
;多线连接
(defun pex(ss / i ename endata entype)
(command "PEDITACCEPT" "1")
    (command ".pedit" "m" ss "" "j" "0" "w" "0" "" "PEDITACCEPT" "0"))



不小心发成悬赏贴了

xyp1964 发表于 2015-9-20 20:47:04


qiuhai1991 发表于 2015-9-20 21:38:09

沙发支持一下,用循环面域会不会不太好

与子成说for伟 发表于 2015-10-1 08:59:13

附件在哪里呀?
页: [1]
查看完整版本: 相邻多段线合并