几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   数据库ObjectDBX (http://www.dimcax.com/hust/forumdisplay.php?f=177)
-   -   【转帖】用excel中的数据绘图 (http://www.dimcax.com/hust/showthread.php?t=8635)

yang686526 2009-04-19 07:43 PM

【转帖】用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


所有的时间均为北京时间。 现在的时间是 05:21 AM.