ntfanl 发表于 2005-12-12 11:16:00

[求助]帮我看看这段代码(关于筛选选择的东东)

<P>&nbsp;&nbsp;&nbsp; dim aCADapp As AcadApplication&nbsp; 'AutoCAD 的application对象<BR>&nbsp;&nbsp;&nbsp; dim aCADdoc As AcadDocument&nbsp;&nbsp; 'AutoCAD document对象<BR>&nbsp;&nbsp;&nbsp; Dim sset As AcadSelectionSet</P>
<P>&nbsp;&nbsp;&nbsp; Set aCADapp = GetObject(, "autoCAD.application")<BR>&nbsp;&nbsp;&nbsp; Set aCADdoc = aCADapp.ActiveDocument<BR>&nbsp;&nbsp;&nbsp; aCADapp.Visible = True '此语句是使CAD可见。<BR>&nbsp;&nbsp;&nbsp; Set sset = aCADdoc.SelectionSets.Add("SelectText")<BR>&nbsp;&nbsp;&nbsp; Dim FilterType As Integer, FilterData As String<BR>&nbsp;&nbsp;&nbsp; FilterType = 0<BR>&nbsp;&nbsp;&nbsp; FilterData = "TEXT"<BR>&nbsp;&nbsp;&nbsp; sset.SelectOnScreen<BR>&nbsp;&nbsp;&nbsp; 'sset.SelectOnScreen&nbsp; FilterType, FilterData</P>
<P>以上是我的代码,意思是只想选择文字的内容,但在实际运行时只能用"sset.SelectOnScreen",而在用"sset.SelectOnScreen&nbsp; FilterType, FilterData"就出错.</P>

zhuxuhong 发表于 2005-12-12 11:37:00

<DIV>dim filtertype(0) as integer</DIV>
<DIV>dim filterdata(0) as variant</DIV>
<DIV>FilterType (0)= 0<BR>&nbsp;&nbsp;&nbsp; FilterData (0)= "TEXT"<BR>试试</DIV>

ntfanl 发表于 2005-12-12 12:51:00

终于搞定了,谢谢楼上的兄弟.
页: [1]
查看完整版本: [求助]帮我看看这段代码(关于筛选选择的东东)