csqqqqq 发表于 2008-8-23 17:09:00

大侠看看这段选择集过滤的代码如何修改

<p>Sub 创建新的选择集()<br/>Dim sset As AcadSelectionSet<br/>&nbsp;&nbsp;&nbsp;&nbsp; If Not IsNull(ThisDrawing.SelectionSets.Item("newadd")) Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set sset = ThisDrawing.SelectionSets.Item("newadd")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sset.Delete<br/>&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>Set sset = ThisDrawing.SelectionSets.Add("newadd")</p><p>FilterType = 8<br/>FilterData = "图层1"</p><p>sset.Select acSelectionSetAll, , , FilterType, FilterData<br/>End Sub<br/>提示FilterType位于Select中无效 代码错误,请指教</p>

mccad 发表于 2008-8-23 21:44:00

<p>已经有人解决了。</p><p>过滤器中的FilterType和Filter均应为数组,而不应该只是整数和变体。</p>
页: [1]
查看完整版本: 大侠看看这段选择集过滤的代码如何修改