AutoCAD 二次开发与横断面绘制.pdf
文本预览下载声明
第33卷 第3期 测绘与空间地理信息 Vo1.33,No.3
2010年 6月 GEOMATlCs&SPAT|ALlNFo毛lMATloNTECHNoLoGY Jun.,2010
AutoCAD二次开发与横断面绘制
付海军,刘宏志,付海霞
(辽宁省摄影测量与遥感院,辽宁 沈阳110034)
摘 要:AutoCAD的二次开发技术是许多领域内专用软件的开发技术,它有利于该领域 内绘 图效率的提 高。本
程序是为通惠排干渠横断面测量开发的一个小程序,主要是针对横断面图绘制部分。程序 中利用AutoCAD二次
开发技术 ,采用VisualBasic6.0,AutoCADVBA为平台,通过 AutoCADActiveXAutomation接 1=/将消息发送到 Au—
toCAD。AutoCADVBA允许VBA环境与AutoCAD同时运行,并通过 ActiveXAutomation接 口对 AutoCAD进行编
程控制,在VisualBasic6.0中用代码进行参数化 自动绘图。程序可以实现横断面图自动生成。为方便使用者操
作,程序设计了与AutoCAD交互的界面,用户只需要在对话框中输入数据文件名,其余的绘图工作 由程序 自动
完成 。
关键词 :横断面测量 ;二次开发 ;AutoCAD;AutoCADVBA;VisualBasic
中图分类号:P208 文献标识码:B 文章编号:1672—5867(2010J03—0120—04
DrawingofCrossSectionBasedonAutoCAD SecondaryDevelopment
FUHai—jun,LIUHong—zhi,FUHai—xia
(LiaoningPhotogrammetryandRemoteSensingInstitute,Shenyang110034,China)
Abstract:ThetechniqueofAutoCAD secondarydevelopmentisappliedinmanyareas,whichhelptoimprovedrawingefficiencyinthe
areas.Thisprogram ismainlydesignedforthecross—sectionalmeasurementanddrawingofTong—HuidrainageditchbasedonAuto—
CAD secondarydevelopmentusingVisualBasic6.0withtheAutoCADActiveXAutomationinterfacesendingrelativemessagestoAu—
toCAD.AutoCAD VBA environmentallowsVBAandAutoCAD toruntogether,ActiveX Automation interfaceisusedforprogram con—
tro],andVisualBasic6.0prorgam isusedofrparameterizedautomaticdrawing.Theprogram couldimplementcross—sectiondrawing
automatically.A friendlyuserinterfaceisdesignedfortheconvenienceoftheuser~operation;theuseronlyneedenterthefilenamein
thedialogueboxandthedrawingwillbefinishedautomaticallybytheprorgam.
Keywords:AutoCAD;AutoCAD VBA;VisualBasic;cross—sectionalmeasurements;secondarydevelopment
toLisp和 ADS,而今利用 AutoCADVBA用户可以通过编
0 引 言
显示全部