求助高手!关于自动处理选择集!
<pre class="Code"><div style="WIDTH: 728px; HEIGHT: 90px;"><script type="text/javascript"></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script><iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-7471407183047897&dt=1206546643062&lmt=1206546643&prev_fmts=728x90_as%2C120x90_0ads_al_s&format=728x90_as&output=html&correlator=1206546641906&channel=9653521252&pv_ch=9653521252%2B&url=http%3A%2F%2Fwww.mjtd.com%2Fbbs%2Fdispbbs.asp%3FboardID%3D4%26ID%3D29542%26page%3D3&color_bg=FFFFFF&color_text=000000&color_link=0000FF&color_url=008000&color_border=C3D9FF&ad_type=text_image&ref=http%3A%2F%2Fwww.mjtd.com%2Fbbs%2Findex.asp%3Fboardid%3D4%26page%3D3&frm=0&cc=100&ga_vid=1926383655.1205852676&ga_sid=1206538624&ga_hid=2085021162&ga_fc=true&flash=9.0.115.0&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_his=11&u_java=true" frameborder="0" width="728" scrolling="no" height="90" allowtransparency="allowtransparency"></iframe></div><p> 本人想将图中特定的实体选择出来(不需要人机交互,程序自动处理),然后自动对其做一定处理后存盘,查看帮助后知道</p><p>可以用过滤的选择集,但是我看<font color="#000080">SelectOnScreen等都需要</font><font color="#000000">人机交互,比如要选择图层"2"中内容为"1/500"的文字进行自动删除,</font></p><p><font color="#000000">选择出来后如何对其进行处理,哪位高手能帮帮忙,帮忙改下下面的程序段,谢谢!</font></p><p>Sub Selectsst()Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET")
Dim FilterType(0) As Integer<br/> Dim FilterData(0) As Variant </p></pre><pre class="Code"><p></p><p><font color="#000080"> FilterType(0) = 0 <br/> FilterData(0) = "TEXT" <br/> sset.SelectOnScreen FilterType, FilterData</font>
End Sub</p></pre> 本人想将图中特定的实体选择出来(不需要人机交互,程序自动处理),然后自动对其做一定处理后存盘,查看帮助后知道可以用过滤的选择集,但是我看<font color="#000080">SelectOnScreen等都需要</font><font color="#000000">人机交互,比如要选择图层"2"中内容为"1/500"的文字进行自动删除,</font><font color="#000000">选择出来后如何对其进行处理,哪位高手能帮帮忙,帮忙改下下面的程序段,谢谢!</font><p>Sub Selectsst()<br/> Dim ssetObj As AcadSelectionSet<br/> Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET")<br/> Dim FilterType(0) As Integer<br/> Dim FilterData(0) As Variant </p><pre class="Code"><p></p><p><font color="#000080"> FilterType(0) = 0 <br/> FilterData(0) = "TEXT" <br/> sset.SelectOnScreen FilterType, FilterData</font>
<br/>End Sub</p></pre> <p> Dim FilterType(2) As Integer<br/> Dim FilterData(2) As Variant<br/> Set sjx = ThisDrawing.SelectionSets.Add("sjx")<br/> <br/> FilterType(0) = 0<br/> FilterData(0) = "text" '是文字</p><p><br/> FilterType(1) = 8<br/> FilterData(1) = "2" '图层2<br/> <br/> FilterType(2) = 1<br/> FilterData(2) = "1/500" '内容是1/500 <br/> sjx.Select acSelectionSetAll, , , FilterType, FilterData</p><p></p><p></p><p></p><p>试试这样</p>
页:
[1]