首页 | 本学科首页   官方微博 | 高级检索  
     检索      

Excel内嵌VBA和COM代码在测量计算中的应用
引用本文:陈永刚,施拥军,汤孟平,徐文兵.Excel内嵌VBA和COM代码在测量计算中的应用[J].浙江林学院学报,2008,25(1):83-87.
作者姓名:陈永刚  施拥军  汤孟平  徐文兵
作者单位:浙江林学院环境科技学院,浙江,临安311300
基金项目:浙江省自然科学基金 , 浙江林学院校科研和教改项目
摘    要:为了能够解决测量平差计算烦琐复杂和人工编写Cass展点文件容易出错的问题,提出一种在Excel中嵌入VBA和COM代码的方法,来简化测量平差计算且可以自动生成Cass展点文件。首先,使用VC中ATL模板开发角度转换和Cass展点COM模块;其次,在Excel中利用VBA代码调用COM模块来实现平差计算和展点文件的自动生成。在浙江林学院数字植物园的1:500大比例尺基础地形图测绘工作中,利用该方法快速准确地进行了25个点的闭合测量导线平差计算和近1.2万个展点文件的自动生成,计算结果均准确无误。该方法可使测量导线平差计算和Cass展点文件生成变得简单方便高效。图5参15

关 键 词:工程测量  测量平差  格式转换  VBA代码  COM模块  Excel应用
文章编号:1000-5692(2008)01-0083-05
收稿时间:2007-01-10
修稿时间:2007-07-02

Measurements and calculations with embedded VBA and COM codes in Excel
CHEN Yong-gang,SHI Yong-jun,TANG Meng-ping,XU Wen-bing.Measurements and calculations with embedded VBA and COM codes in Excel[J].Journal of Zhejiang Forestry College,2008,25(1):83-87.
Authors:CHEN Yong-gang  SHI Yong-jun  TANG Meng-ping  XU Wen-bing
Institution:(School of Environmental Technology, Zhejiang Forestry College, Lin'an 311300, Zhejiang, China)
Abstract:The aim is to simplify calculations of measurement adjustment and create points' files in computer assisted search service (CASS) automatically. In this study, visual basic for applications (VBA) and component object model (COM) codes were embedded into Microsoft Excel. Calculations of adjusted measurements were simplified and point files in CASS were automatically created. With this method, first COM modules with angle converts and CASS points using an active template library (ATL) template from VC were developed. Then, COM modules were used with VBA code in Excel so that measurement adjustments were calculated and point files were automatically created. This method was used for topographic measurements from 1 : 500 large-scale maps in the digital botanical garden of Zhejiang Forestry College with 25 points being rapidly calculated by adjustment of a closed traverse. Results revealed nearly 12 000 point files that were created automatically and accurately. With this method, complex calculating procedures were not necessary, unlike before when manually performed, and when ereating the point files, mistakes were rarely made. This study showed that adjusted calculations of a closed traverse and automatic creation of point files, was relatively easy. Ch, 5 fig. 15 ref. ]
Keywords:engineering survey  survey adjustment  format transformation  visual basic for applications (VBA)  component object model (COM module)  Excel application
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号