lgw681 发表于 2006-12-28 23:24:00

[分享]将选取的多线、直线、圆孤连接成一条多段线

<p>;;;将选取的多线、直线、圆孤连接成一条多段线</p><p>;;;用法:(XL-L2PLX&nbsp; SS)</p><p>;;;参数:SS&nbsp;&nbsp; 选择集<br/>(defun xl-l2plx&nbsp;(s2 / n e edxflist )<br/>&nbsp; (setq n (sslength s2))<br/>&nbsp; (repeat n<br/>&nbsp;&nbsp;&nbsp; (if&nbsp;(setq e (ssname s2 0))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (progn<br/>&nbsp;(if (cdr (assoc 0 (entget e)))<br/>&nbsp;&nbsp; (progn<br/>&nbsp;&nbsp;&nbsp;&nbsp; (if&nbsp;(wcmatch (cdr (assoc 0 (entget e))) "*POLYLINE")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (command ".pedit" e "j" s2 "" "")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (command ".pedit" e "y" "j" s2 "" "")<br/>&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;&nbsp;<br/>&nbsp;(setq edxflist (entget e))<br/>&nbsp;(if (= (cdr (assoc 70 edxflist)) 1)<br/>&nbsp;&nbsp; (progn<br/>&nbsp;&nbsp;&nbsp;&nbsp; (ssdel e s0)<br/>&nbsp;&nbsp;&nbsp;&nbsp; (setq n (1- n))<br/>&nbsp;&nbsp; )&nbsp;<br/>&nbsp;)&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;&nbsp;&nbsp;&nbsp; )&nbsp;<br/>&nbsp;&nbsp;&nbsp; (ssdel e s2)<br/>&nbsp; )&nbsp;<br/>&nbsp; (princ)<br/>)</p>

arthwon 发表于 2007-3-2 18:39:00

很好!另外请问如何合并成一条直线?

gzbccy 发表于 2011-1-10 11:58:11

你好,断开的能连接吗?是不是要首尾相连才可以?

lqss 发表于 2011-1-12 09:37:40

命令是什么呢?

tony1435 发表于 2011-7-5 15:50:31

怎么用这个啊??

328302216 发表于 2012-9-26 15:13:57

只发了个子程序噶

c735023723 发表于 2012-9-26 20:26:10

命令?

清风明月名字 发表于 2013-6-29 09:09:38

谢谢楼主代码分享!

f4800 发表于 2020-11-1 07:01:38

学习学习学习一下!
页: [1]
查看完整版本: [分享]将选取的多线、直线、圆孤连接成一条多段线