指点~~为什么没结果
<P>怎么没的结果呢<BR>Sub lr()<BR>Dim Selects As AcadSelectionSet<BR>Dim FType(0) As Integer '选择过滤器的类型代码<BR>Dim FData(0) As Variant ' 选择过滤器的值<BR>Dim entity As AcadEntity<BR>Dim L, r As Integer<BR><BR>FType(0) = 0 ' FData(0) = "Line,Arc" </P><P>' ' 选择图元<BR>Set Selects = ThisDrawing.SelectionSets.Add("lr4")<BR>Selects.SelectOnScreen FType, FData<BR>For Each entity In Selects<BR> If EntityName = "acdbline" Then L = L + 1<BR> If EntityName = "acdbarc" Then r = r + 1<BR> Next<BR> MsgBox L, r<BR> Selects.Delete</P>
<P><BR>End Sub<BR></P> For Each entity In Selects
If ucase(entity.ObjectName) = "ACDBLINE" Then
L = L + 1
else
r = r + 1
end if
Next
谢谢了啊~~~
页:
[1]