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

选择集过滤器问题

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

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

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