用excel中的数据绘图
www.dimcax.com
用excel中的数据绘图
哪位高手帮忙看一下下面的程序有什么问题,总是运行不对,先谢谢了!
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