Visual Basic和AutoCAD在水文图线绘制中的应用
2021-07-13许杰


作者简介:许杰(1989—),男,本科,工程师,主要从事水文测验整编及测量工作。
摘 要:水文图形标准化要求较高,样式很多,包括断面图、水位流量关系线图,以及每月的水位过程、流量过程等图形。传统手工绘制节点较多,工作量大且容易出错,水文图线的自动绘制及图形存储是水文工作中的难点。本文利用Visual Basic编制界面友好、操作方便的图线自动绘制程序程序,将绘制图形的参数自动转换成AutoCAD中所需的坐标数据组和格式,在AutoCAD相应的模板中批量展点和识别,从而快速地绘制出水文各类图形,提高工作效率和准确率,实现水文绘图工作无纸化。
关键词:Visual Basic AutoCAD 水文 图形绘制
中图分类号:P25
DOI:10.16660/j.cnki.1674-098X.2201-5640-2097
Abstract: The standardization requirements of hydrological graphics are high, and there are many styles, including section diagram, water level and flow relationship diagram, monthly water level process, flow process and other graphics. The traditional manual drawing has many nodes, heavy workload and easy to make mistakes. The automatic drawing and graphic storage of hydrological map line are the difficulties in hydrological work. In this paper, Visual Basic is used to compile an automatic drawing program with friendly interface and convenient operation. The parameters of drawing graphics are automatically converted into the coordinate data group and format required in AutoCAD, and the points are displayed and identified in batch in the corresponding template of AutoCAD, so as to quickly draw various hydrological graphics and improve work efficiency and accuracy, Realize paperless hydrological mapping.
Key Words: Visual Basic; AutoCAD ; Hydrology; Graphic drawing
随着计算机技术的发展,水文数据已进入现代化信息管理时代,雨量、水位、流量等均可通过软件进行整汇编,大大减轻了工作量。但是大断面、水位过程线、水位流量关系线等水文图线却仍以手工绘制为主,并作为原始档案进行存贮。采用手工绘制,费工费时,点绘过程中极易出错,在每年的各级资料审查过程中,审核工作量巨大,而且档案存贮、查询及应用极不方便[1]。
AutoCAD是由美国Autodesk(欧特克)公司开发的自动计算机辅助设计软件,可以使用它来创建、浏览、管理、打印、输出、共享及准确应用富含信息的设计图形。利用AutoCAD强大的绘图功能,逐渐用高效率、高精度的CAD绘图技术替代传统的水文绘图工作优势明显[2]。由于水文图形样式很多,水文图形数据与CAD绘图坐标比例的转换较为繁琐,利用Visual Basic编制绘图程序,可以大大简化数据转换工作。……
