athome 发表于 2008-7-11 11:49:00

选择集过滤器问题

<p>Public Sub CreateSSetFilter(ByRef filterType As Variant, ByRef filterData As Variant, ParamArray filter())<br/>If UBound(filter) Mod 2 = 0 Then<br/>&nbsp;&nbsp;&nbsp; MsgBox "Fileter 参数无效"<br/>&nbsp;&nbsp;&nbsp; Exit Sub</p><p>End If</p><p>Dim fType As Integer<br/>Dim fData As Variant<br/>Dim count As Integer<br/>count = (UBound(filter) + 1) / 2<br/>ReDim fType(count - 1)<br/>ReDim fData(count - 1)<br/>Dim i As Integer<br/>For i = 0 To count - 1<br/>&nbsp;&nbsp;&nbsp; fType(i) = fType(2 * i)<br/>&nbsp;&nbsp;&nbsp; fData(i) = fData(2 * i + 1)<br/>&nbsp;&nbsp;&nbsp; <br/>Next i</p><p>filterType = fType<br/>filterData = fData</p><p></p><p></p><p>有没有人能帮我看看这段代码中,选择集过滤器的数组的维数如何确定的?怎么规定的?</p>

兰州人 发表于 2008-7-11 16:30:00

<p></p><p>请看autocadVBA二次开发教程 第65页和129页,有详细的介绍,或按此要点在网上找一下。</p><p>&nbsp;&nbsp; fType(0) =&nbsp;-4</p><p>&nbsp;&nbsp; fType(0) =&nbsp;0 是图元, 8--图层&nbsp;&nbsp;&nbsp; </p><p>fData(0) 可以是line 或图层名<br/></p>
页: [1]
查看完整版本: 选择集过滤器问题