怎么没的结果呢 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
[/U] |