bsirhell 发表于 2006-11-5 12:42:00

[求助]过滤桢同数据的问题

本帖最后由 作者 于 2006-11-6 17:43:07 编辑 <br /><br /> <P>Sub N12()</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp; On Error Resume Next<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim ENT As AcadEntity<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim sset As AcadSelectionSet<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim objtext As AcadText<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Error Resume Next<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not IsNull(ThisDrawing.SelectionSets.Item("TEXT")) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set sset = ThisDrawing.SelectionSets.Item("TEXT")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sset.Delete<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set sset = ThisDrawing.SelectionSets.Add("TEXT")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim filtertype(0) As Integer<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim filterdata(0) As Variant<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; filtertype(0) = 0<BR>&nbsp;&nbsp;&nbsp;&nbsp; filterdata(0) = "text"<BR>&nbsp;&nbsp;&nbsp;&nbsp; sset.selectonscreen filtertype, filterdata<BR>&nbsp;&nbsp;&nbsp;&nbsp; Dim count As Long<BR>&nbsp;&nbsp;&nbsp;&nbsp; count = sset.count<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; Dim text1()<BR>&nbsp;&nbsp;&nbsp;&nbsp; ReDim text1(count)<BR>&nbsp;&nbsp;&nbsp;&nbsp; Dim i As Long<BR>&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To sset.count - 1<BR>&nbsp;&nbsp;&nbsp;&nbsp; Set text1(i) = sset.Item(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp; Next<BR>&nbsp;&nbsp;&nbsp;&nbsp; MsgBox UBound(text1)<BR>&nbsp;&nbsp;&nbsp; ' For i = LBound(text1) To UBound(text1)<BR>&nbsp;&nbsp;&nbsp;&nbsp; 'MsgBox text1(i).TextString<BR>&nbsp;&nbsp;&nbsp;&nbsp; 'Next<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; Dim newarray()<BR>&nbsp;&nbsp;&nbsp;&nbsp; newarray = getArray(text1)<BR>&nbsp;&nbsp;&nbsp;&nbsp; For i = LBound(text1) To UBound(text1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox newarray(i).TextString<BR>&nbsp;&nbsp;&nbsp;&nbsp; Next<BR>&nbsp;<BR>End Sub</P>
<P>此过程为何不能显示过滤后的字符?</P>
页: [1]
查看完整版本: [求助]过滤桢同数据的问题