'在下列程序前,首先生成只包括圆的sset选择集
Dim delArray(0) As AcadCircle Dim delSet As AcadSelectionSet
Set delSet = ThisDrawing.SelectionSets.Add("delset1")
Dim i As Integer Dim j As Integer Dim obj1 As AcadCircle Dim obj2 As AcadCircle
For i = 0 To sset.Count - 1
Set delArray(0) = sset.Item(i)
For j = 0 To sset.Count - 1 Set obj2 = sset.Item(j) If delArray(0).Center(0) = obj2.Center(0) And delArray(0).Center(1) = obj2.Center(1) Then If delArray(0).Radius > obj2.Radius Then
Set delArray(0) = obj2
End If
End If
Next j
delSet.AddItems delArray Next i
delSet.Erase
使用上述程序,不知达到你的要求吗? |