哪位高手帮忙看一下下面的程序有什么问题,总是运行不对,先谢谢了! Private Sub draw() Dim xlsApp As Excel.Application Dim eworkbook As Workbook Dim eworksheet As Worksheet Dim cir As AcadEntity Dim b(0 To 2) As Double Dim c As Double Dim x As Acad3DSolid Dim d As Double Dim e As Double Dim re As Variant Dim height As Double hight = 500 e = 0 Set xlsApp = New Excel.Application Set eworkbook = xlsApp.Workbooks.Open("F:\国道112\坐标.xls") Set eworksheet = eworkbook.Sheets("8标的桥位坐标表") For i = 4 To 118 With eworksheet b(0) = .Cells(i, 4) b(1) = .Cells(i, 5) b(2) = .Cells(i, 6) c = .Cells(i, 7) End With Set cir = ThisDrawing.ModelSpace.addcircle(b, c) re = ThisDrawing.ModelSpace.AddRegion(cir) Set x = ThisDrawing.ModelSpace.AddExtrudedSolid(re, height, e) Next i ZoomAll eworkbook.Close xlsApp.Quit End Sub |