lufan82 发表于 2005-12-18 10:15:00

过滤器的问题,大家来看看我设置得错没有

<P>我想过滤出其中几个层的TEXT数据,我这样写对不对啊,出不来结果啊</P>
<P>Dim sset1 As AcadSelectionSet</P>
<P>Dim&nbsp;FilterType(3)&nbsp;As&nbsp;Integer<BR>Dim&nbsp;FilterData(3)&nbsp;As&nbsp;Variant<BR>FilterType(0)&nbsp;=&nbsp;0<BR>FilterData(0)&nbsp;=&nbsp;"text"<BR>FilterType(1)&nbsp;=&nbsp;8<BR>FilterData(1)&nbsp;=&nbsp;'"one"&nbsp;'</P>
<P>filterdata(2)=8</P>
<P>filtertype(3)="two"</P>
<P>filterdata(3)=8</P>
<P>filtertype="three"<BR><BR>sset1.Select acSelectionSetAll&nbsp;,,&nbsp;,&nbsp;Filterdata,&nbsp;Filtertype</P>

songzhi 发表于 2005-12-18 14:09:00

<P>写得有问题啊!</P>
<P>似乎应该这样吧:</P>
<P>Dim sset1 As AcadSelectionSet</P>
<P>Dim&nbsp;FilterType(5)&nbsp;As&nbsp;Integer<BR>Dim&nbsp;FilterData(5)&nbsp;As&nbsp;Variant<BR>FilterType(0)&nbsp;=&nbsp;0<BR>FilterData(0)&nbsp;=&nbsp;"text"<BR>FilterType(1)&nbsp;=&nbsp;-4<BR>FilterData(1)&nbsp;=&nbsp;"&lt;or"</P>
<P>filtertype(2)=8</P>
<P>filterdata(2)="one"</P>
<P>filtertype(3)=8<BR>filterdata(3)="two"</P>
<P>filtertype(4)=8</P>
<P>filterdata(4)="three"</P>
<P>filtertype(5)=-4</P>
<P>filterdata(5)="or&gt;"</P>
<P><BR>sset1.Select acSelectionSetAll&nbsp;,,&nbsp;,&nbsp;Filterdata,&nbsp;Filtertype</P>

zhuxuhong 发表于 2005-12-18 15:58:00

<DIV>好象不用这么复杂吧</DIV>
<DIV>FilterData(1)&nbsp;=&nbsp;'"one,two,three"&nbsp; 应该就可以的</DIV>
页: [1]
查看完整版本: 过滤器的问题,大家来看看我设置得错没有