查看单个帖子
旧 2009-04-19, 07:43 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】用excel中的数据绘图

用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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)