kinglau 发表于 2006-3-2 16:24:00

指点~~为什么没结果

怎么没的结果呢
Sub lr()
Dim Selects As AcadSelectionSet
Dim FType(0) As Integer          '选择过滤器的类型代码
Dim FData(0) As Variant          ' 选择过滤器的值
Dim entity As AcadEntity
Dim L, r As Integer
FType(0) = 0               ' FData(0) = "Line,Arc"            
' ' 选择图元
Set Selects = ThisDrawing.SelectionSets.Add("lr4")
Selects.SelectOnScreen FType, FData
For Each entity In Selects
If EntityName = "acdbline" Then L = L + 1
If EntityName = "acdbarc" Then r = r + 1
Next
MsgBox L, r
Selects.Delete

End Sub

雪山飞狐_lzh 发表于 2006-3-2 18:21:00

复制代码

kinglau 发表于 2006-3-3 21:29:00

谢谢了啊~~~
页: [1]
查看完整版本: 指点~~为什么没结果