xiaohuameng 发表于 2008-3-27 00:01:00

求助高手!关于自动处理选择集!

<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&amp;dt=1206546643062&amp;lmt=1206546643&amp;prev_fmts=728x90_as%2C120x90_0ads_al_s&amp;format=728x90_as&amp;output=html&amp;correlator=1206546641906&amp;channel=9653521252&amp;pv_ch=9653521252%2B&amp;url=http%3A%2F%2Fwww.mjtd.com%2Fbbs%2Fdispbbs.asp%3FboardID%3D4%26ID%3D29542%26page%3D3&amp;color_bg=FFFFFF&amp;color_text=000000&amp;color_link=0000FF&amp;color_url=008000&amp;color_border=C3D9FF&amp;ad_type=text_image&amp;ref=http%3A%2F%2Fwww.mjtd.com%2Fbbs%2Findex.asp%3Fboardid%3D4%26page%3D3&amp;frm=0&amp;cc=100&amp;ga_vid=1926383655.1205852676&amp;ga_sid=1206538624&amp;ga_hid=2085021162&amp;ga_fc=true&amp;flash=9.0.115.0&amp;u_h=768&amp;u_w=1024&amp;u_ah=738&amp;u_aw=1024&amp;u_cd=32&amp;u_tz=480&amp;u_his=11&amp;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&nbsp;<br/>    FilterData(0) = "TEXT"&nbsp;<br/>    sset.SelectOnScreen FilterType, FilterData</font>      
End Sub</p></pre>

xiaohuameng 发表于 2008-3-27 00:03:00

本人想将图中特定的实体选择出来(不需要人机交互,程序自动处理),然后自动对其做一定处理后存盘,查看帮助后知道可以用过滤的选择集,但是我看<font color="#000080">SelectOnScreen等都需要</font><font color="#000000">人机交互,比如要选择图层"2"中内容为"1/500"的文字进行自动删除,</font><font color="#000000">选择出来后如何对其进行处理,哪位高手能帮帮忙,帮忙改下下面的程序段,谢谢!</font><p>Sub Selectsst()<br/>&nbsp;&nbsp;&nbsp; Dim ssetObj As AcadSelectionSet<br/>&nbsp;&nbsp;&nbsp; Set ssetObj = ThisDrawing.SelectionSets.Add("TEST_SSET")<br/>&nbsp;&nbsp;&nbsp; Dim FilterType(0) As Integer<br/>&nbsp;&nbsp;&nbsp; Dim FilterData(0) As Variant </p><pre class="Code"><p></p><p><font color="#000080">    FilterType(0) = 0&nbsp;<br/>    FilterData(0) = "TEXT"&nbsp;<br/>    sset.SelectOnScreen FilterType, FilterData</font>
<br/>End Sub</p></pre>

fjfhgdwfn 发表于 2008-3-27 08:15:00

<p>&nbsp;Dim FilterType(2) As Integer<br/>&nbsp;&nbsp; Dim FilterData(2) As Variant<br/>&nbsp;&nbsp; Set sjx = ThisDrawing.SelectionSets.Add("sjx")<br/>&nbsp;&nbsp; <br/>&nbsp;&nbsp; FilterType(0) = 0<br/>&nbsp;&nbsp; FilterData(0) = "text" '是文字</p><p><br/>&nbsp;&nbsp; FilterType(1) = 8<br/>&nbsp;&nbsp; FilterData(1) = "2"&nbsp; '图层2<br/>&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp; FilterType(2) = 1<br/>&nbsp;&nbsp; FilterData(2) = "1/500"&nbsp; '内容是1/500&nbsp;&nbsp;&nbsp;<br/>&nbsp;sjx.Select acSelectionSetAll, , , FilterType, FilterData</p><p></p><p></p><p></p><p>试试这样</p>
页: [1]
查看完整版本: 求助高手!关于自动处理选择集!