sailor538 发表于 2006-11-4 09:03:00

高手来看怎么用VBA合并多线段?

如题,大家帮帮忙?

wyj7485 发表于 2006-12-11 16:44:00

本帖最后由 作者 于 2007-2-10 8:19:44 编辑

这是我用的程序Sub EditPline()
On Error Resume Next
Dim sset As AcadSelectionSet
ThisDrawing.SelectionSets.Item("LineSet").Delete
Set sset = ThisDrawing.SelectionSets.Add("LineSet")
sset.SelectOnScreen
ThisDrawing.SendCommand "_pedit" & vbCr & "M" & vbCr & _
"p" & vbCr & vbCr & "Y" & vbCr & "J" & _
vbCr & vbCr & vbCr
End Sub

shirazbj 发表于 2006-11-4 10:00:00

把每段线的坐标取出来,然后判断谁和谁相连,最后把端点坐标按顺序赋给一点坐标数组,生成一个polyline.

sailor538 发表于 2006-11-4 13:45:00

<P>ths,不知道用PEDIT怎么做,下面可以选择一条多线段,不知道怎么选择多条<BR>这是我在AUTODESK论坛上面看到的</P>
<P>ThisDrawing.SendCommand "pedit " &amp; "(handent """ &amp; _<BR>curEnt.Handle &amp; """) "</P>

cangcang 发表于 2006-12-5 12:57:00

<P>编辑多段线,多段线各端点作为数组集合即可</P>
<P>&nbsp;</P>

紫色狂澜 发表于 2006-12-10 14:17:00

<p>关注</p><p>正发愁呢</p><p>自己读取坐标连接出了点问题</p><p>关注中</p>

sailor538 发表于 2006-12-17 10:54:00

<strong><font face="Verdana" color="#da2549">多谢wyj7485 ,很好,强</font></strong>
页: [1]
查看完整版本: 高手来看怎么用VBA合并多线段?