CAD技术结合VBA在高速公路工程中的应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
通过多年的设计实践CAD技术以简单、快捷、存储方便等优点已在工程设计中承担着不可替代的重要作用。CAD技术的应用使工程设计人员如虎添翼,在更加广阔的天地里施展才华。但随着CAD在工程中的大量应用及其技术的成熟,一些优缺点也显露出来。而VBA作为一个集成的开发环境,能够使AutoCAD数据与其它的VBA应用程序,如Microsoft Excel软件,直接共享,实现无缝连接,交换数据。
     计算机辅助设计技术也称为CAD技术,是英文Computer Aided Design的缩写,它是指在设计过程中,利用计算机作为工具,帮助工程师进行设计的一切实用技术的总和。CAD技术领域很广,用的最为广泛的是二、三维的几何形体建模、绘图,各种机械零部件的设计、电路设计、建筑结构设计、力学分析等等。
     计算机辅助设计作为一门学科始于60年代初,一直到70年代,由于受到计算机技术的限制,CAD技术的发展很缓慢,进入80年代以来,计算机技术突飞猛进,特别是微机和工作站的发展和普及,再加上功能强大的外围设备,如大型图形显示器、绘图仪、激光打印机的问世,极大地推动了CAD技术的发展,CAD技术已进入实用化阶段,广泛服务于机械、电子、宇航、建筑、纺织等产品的总体设计、造型设计、结构设计、工艺过程设计等环节。
     在工业化国家如美国、日本和欧洲,CAD已广泛应用于设计与制造的各个领域如工程建筑、装饰、机械、电子、汽车、造船、航天、服装、玩具等行业,实现了100%的计算机绘图。CAD系统的销售额每年以30~40%的速度递增,各种CAD软件的功能越来越完善,越来越强大。国内于70年代末开始CAD技术的大力推广应用工作,已经取得可喜的成绩。
     VBA(Visual Basic for Application)是一种完全面向对象体系结构的编程语言,由于其在开发方面的易用性和具有强大的功能,因此许多应用程序均嵌入该语言作为开发工具。Autodesk公司也在AutoCAD R14.01版本开始内置了VBA开发工具,同时提供了适用于VBA开发的ActiveX Automation对象模型。直到90年代早期,使应用程序自动化还是充满挑战性的领域。对每个需要自动化的应用程序,人们不得不学习一种不同的自动化语言。例如:可以用EXCEL的宏语言来使EXCEL自动化,使用WORD BASIC使WORD自动化,等等。微软决定让它开发出来的应用程序共享一种通用的自动化语言--------Visual Basic For Application(VBA),可以认为VBA是非常流行的应用程序开发语言VASUAL BASIC的子集。实际上VBA是"寄生于"VB应用程序的版本。
     本文介绍CAD,VBA的概念和作用以及如何利用VBA编程建立AutoCAD2002与Excel2000的通信,实现数据交换,快速绘制公路纵断面地面线以及把EXCEL表转换成ATUOCAD表。
CAD technology has played an irreplaceable role in engineering design for its advantages such as simplicity, convenience, and easy storage during years of practice. Although the application of CAD technology greatly enhances the efficiency of designers, some shortcomings arise. VBA being a compositive develop environment can achieve direct share between AutoCAD data and other VBA applications such as Microsoft Excel.
     CAD technology (Computer Aided Design) refers to the practical technology mediated by computer the aid the engineer during the design process. CAD technology is most widely used in two or three dimensional geometric modeling, plotting, mechanical accessory design, circuitry design, architecture design and mechanics analysis, etc.
     CAD as a knowledge began in the 1960’s, and developed slowly for the constrains of computer technology until the end of 1970’s. in the 1980’s, CAD became practical for the popularity of micro computer and stations, and it served diffusely in mechanism, electronics, astrionics and spinning.
     CAD now is applied in all areas concerns design and manufacture in industrial society such as USA, European and Japan. The sale of CAD increases by 30% to 40% each year and the functions of the CAD software become more and more powerful. The implementation of CAD technology in China has been quite productive since the end of 1970’s.
     VBA(Visual Basic for Application)is an absolute object-oriented programming language, and many applications embeds this language as a developing tool for its simplicity and powerful functions. Autodest Corporation embedded VBA into CAD since version R14.01 as well as provided ActiveX Automation object model which is adapted to VBA developing. VBA is a universal automatic language for implications developed by Microsoft, which can be regarded as a subcategory of the popular programming language Visual Basic.
     This article introduces the concept of CAD and VBA as well as their functions. It also elaborates how to build up communications between AutoCAD 2002 and Excel 2000 to achieve data exchange; how to plot road desighing efficiently and how to convert an Excel table into an AutoCAD table.
引文
[1] AutoCAD VBA 开发精彩实例教程 王华杰 清华大学出版社 2003
    [2]用 VB 开发 AutoCAD 2000 应用程序 《北京:人民邮电出版社》 老虎工作室 2002
    [3] AutoCAD 2000 ObjectARX 编程指南 Charles McAuley 机械工业出版社 2005
    [4] AutoCAD2000 开发工具 《北京:人民邮电出版社》 胡荣 2005
    [5] 用 VBA 在 AutoCAD2000 中开发标准件绘图模块 《CAD/CAM 计算机辅助设计与制造》 胡志华 2004
    [6] 基于实体数据的机械 CAD 系统装配图标题栏生成应用程序 《机械》 王国顺 2003
    [7] 利用 AutoCAD VBA 开发用户图库系统 A practical user- drawing- library system based on AutoCAD VBA 张玉萍 蒋寿伟 尹忠慰 宋健 机械设计与制造 Machinery Design & Manufacture 2005
    [8] 用PB和VBA实现AutoCAD的图库管理 Utilization of PB and VBA to Realize Graph Library Management in AutoCAD 叶涛 郭晖 YE Tao GUO Hui 重庆工学院学报(自然科学版) Journal of Chongqing Institute of Technology 2003
    [9] 基于 VBA 的参数化图库 PARAMETRIC GALLERY BASED ON VBA 罗丹 湖南文理学院学报(自然科学版) Journal of Hunan University of Arts and Science(Natural Science) 2001 年,第 04 期
    [10] 利用 AutoCAD 实现建筑设计图库的开发 Using Secondary Development Function of AutoCAD to Practice the Image-Library of the Building-Design 浦炜 常熟理工学院学报 Journal of Changshu Institute of Technology 2004 年,第 02 期
    [11] 用 VBA 开发模具图库 The Development of Mould Graphics Library by VBA 沈洪雷 胡少刚 周成彬 轻工机械 Light Industry Machinery 2005 年,第 01 期
    [12] 基于 AutoCAD 工程图学考试系统的开发 The Development of Engineering Graphics Examination System Based on AutoCAD 赵大兴 李九灵 龚凌云 张明权 工程图学学报 Journal of Engineering Graphics 2006 年,第 04 期
    [13]利用VC++开发的基于ODBC的AutoCAD图库管理系统 Development of AutoCAD Graphic DBMS Based on ODBC by VC + + 李建伟 闫献国 郭宏 太原科技大学学报 Journal of Taiyuan University of Science and Technology 2002 年,第 02 期
    [14] AutoCAD 二次开发技术在配电网绘图中的应用 Application of AutoCAD Secondary Development Technology on Distribution Grid Drawing 华桦 华栋 何宾宾 江西电力 JiangxiElectric Power 2005 年,第 03 期
    [15] 使用 Delphi+VBA 开发数据库应用程序的报表系统 The Reporting System of Developing the Database Application Programme with Delphi + VBA 杜俭强 科技情报开发与经济 Sci/Tech Information Development & Economy 2004 年,第 12 期
    [16] 工程图技术要求自动生成工具的设计与实现 The Design and Realization of an Automatic Generator of Technical Specification for Engineering Drawing 刘晓婷 罗时飞. 工程图学学报 Journal of Engineering Graphics 2001 年,第 04 期
    [17] AutoCAD 二次开发技术 VBA 在 CAD 系统中的应用 王斌 连永祥 中国制造业信息化 Manufacturing Information Engineering of China 2005 年,第 12 期
    [18] 建筑结构 CAD 樊江 重庆大学出版社 2005
    [19] CAD 程序设计方法--21 世纪计算机系列教材 郑忠俊 沈予洪 张兴亮 上海交通大学出版社 2005
    [20]开目 CAD 软件自学教程 严晓光 机械工业出版社 2005