我在VBa里做好了
Public Sub test() Dim ss As AcadSelectionSet Dim i As AcadEntity Set ss = ThisDrawing.ActiveSelectionSet ss.Select acSelectionSetAll ss(0).GetBoundingBox pmin, pmax For Each i In ss i.GetBoundingBox p1, p2 If p1(0) < pmin(0) Then pmin(0) = p1(0) If p1(1) < pmin(1) Then pmin(1) = p1(1) If p2(0) > pmax(0) Then pmax(0) = p2(0) If p2(1) > pmax(1) Then pmax(1) = p2(1) Next i ThisDrawing.SendCommand "_.RECTANG " & pmin(0) & "," & pmin(1) & vbCr & pmax(0) & "," & pmax(1) & vbCr End Sub 用龙斑竹的办法16240个实体大概用了8秒
我的程序用了2秒
我要的是快速