求助:块选择过滤问题
<p>On Error Resume Next<br/> Dim FilterSets As AcadSelectionSet<br/> If Not IsNull(FilterSets.Item("BlockRef")) Then<br/> Set FilterSets = ThisDrawing.SelectionSets.Item("BlockRef")<br/> FilterSets.Delete<br/> End If<br/> Set FilterSets = ThisDrawing.SelectionSets.Add("BlockRef")<br/> '创建过滤机制<br/> Dim fType(0) As Integer<br/> Dim fData(0) As Variant<br/> fType(0) = 0<br/> fData(0) = "BlockRef"<br/> '提示用户选择<br/> FilterSets.SelectOnScreen fType, fData</p><p>这是我设定的在屏幕上选取块的过滤条件,可是为什么选不中块呢,总是提示显示0个对象,请高手指教!谢谢</p> <p>fData(0) = "BlockRef"<br/>问题主要出在这,谁能告诉我这个参数怎么设置吗?</p><p></p> <p> Dim blockRefObj As AcadBlockReference<br/> Dim Sall As AcadSelectionSet<br/> Dim FilterType(0) As Integer<br/> Dim FilterData(0) As Variant<br/> Dim InsertionPnt(0 To 2) As Double<br/> FilterType(0) = 0<br/> FilterData(0) = "insert"</p><p></p><p> '''''开始构造选择集<br/> Set Sall = acadDoc.SelectionSets.Add("SS1")<br/> Sall.Select acSelectionSetAll, , , FilterType, FilterData ''''''找出选择集中的块属性</p><p></p><p></p><p>''''''具体操作过程</p><p></p><p></p><p> Sall.Delete ''''''释放选择集</p><p></p><p></p> <p>哈哈果然可以,牛人,谢谢,问题解决了,打死我也想不到会是"insert"</p> <p>噢,我也找怎么过滤只选择块,谢谢</p>
页:
[1]