liaoost 发表于 2008-6-18 16:16:00

用COM(VB.NET)与CAD连结的选择集过滤间题

<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt;">请问如何在VB.NET下以COM方法跟CAD连结.取得选择集<br/>目前程序如下<br/>Dim Cad As Autodesk.AutoCAD.Interop.AcadApplication <br/>Cad = New Autodesk.AutoCAD.Interop.AcadApplication<br/>Dim Open_Cad_File As AcadDocument = Cad.Documents.Open("C:\0\0.dwg")<br/>Dim ssRev As Autodesk.AutoCAD.Interop.AcadSelectionSet<br/>Dim ssRevs As Autodesk.AutoCAD.Interop.AcadSelectionSets<br/>Dim FilterType(0 To 3) As Object <br/>Dim FilterData(0 To 3) As Object <br/>FilterType(0) = -4<br/>FilterData(0) = "&lt;AND"<br/>FilterType(1) = 1<br/>FilterData(1) = "REV"<br/>FilterType(2) = 0 <br/>FilterData(2) = "TEXT" <br/>FilterType(3) = -4 <br/>FilterData(3) = "AND&gt;"<br/>ssRevs = Cad.ActiveDocument.SelectionSets<br/>ssRev = Cad.ActiveDocument.SelectionSets.Add(“REV”)<br/>ssRev.Select(AcSelect.acSelectionSetAll, , , FilterType, FilterData) ←
                Error:无效的自变量
                FilterType (于
                Select 中)<br/>请问FilterType, FilterData 要如何处理?<br/>谢谢. <span style="mso-spacerun: yes;">&nbsp;</span></p>

liaoost 发表于 2008-6-20 09:53:00

<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt;">没人帮忙处理<p></p></p>是我的问题写的不太明白吗?

flydyt 发表于 2010-5-28 15:48:00

雪山飞狐_lzh 发表于 2010-5-28 19:28:00

<p>已经解释很多遍了</p>
<p>Dim FilterType(0 To 3) As Short</p>

flydyt 发表于 2010-5-29 10:50:00

页: [1]
查看完整版本: 用COM(VB.NET)与CAD连结的选择集过滤间题