用excel中的数据绘图
<p>哪位高手帮忙看一下下面的程序有什么问题,总是运行不对,先谢谢了!</p><p>Private Sub draw()<br/> <br/> Dim xlsApp As Excel.Application<br/> Dim eworkbook As Workbook<br/> Dim eworksheet As Worksheet<br/> Dim cir As AcadEntity<br/> Dim b(0 To 2) As Double<br/> Dim c As Double<br/> Dim x As Acad3DSolid<br/> Dim d As Double<br/> Dim e As Double<br/> Dim re As Variant<br/> Dim height As Double<br/> hight = 500<br/> e = 0<br/> Set xlsApp = New Excel.Application<br/> Set eworkbook = xlsApp.Workbooks.Open("F:\国道112\坐标.xls")<br/> Set eworksheet = eworkbook.Sheets("8标的桥位坐标表")<br/> <br/> For i = 4 To 118<br/> <br/> With eworksheet<br/> <br/> b(0) = .Cells(i, 4)<br/> b(1) = .Cells(i, 5)<br/> b(2) = .Cells(i, 6)<br/> c = .Cells(i, 7)<br/> <br/> End With<br/> Set cir = ThisDrawing.ModelSpace.addcircle(b, c)<br/> re = ThisDrawing.ModelSpace.AddRegion(cir)<br/> Set x = ThisDrawing.ModelSpace.AddExtrudedSolid(re, height, e)<br/> <br/> Next i<br/> ZoomAll<br/> <br/> eworkbook.Close<br/> xlsApp.Quit<br/> <br/> End Sub</p> 新手,路过,学习中.不能给你答案了. <p> Set x = ThisDrawing.ModelSpace.AddExtrudedSolid(re, height, e)改为</p><p> Set x = ThisDrawing.ModelSpace.AddExtrudedSolid(re(0), height, e)?<br/><br/></p> 我正在初学中,无法解决这个问题。 太过于深奥。请求高手。。
页:
[1]