文档介绍:.
VBA: Integrating with Microsoft Excel - Part 1
By dave-espinosa aguilar
This article is the first in a series on integrating the programming power of AutoCAD® VBA with the functionality found in other Windows
applications—specifically, Microsoft Excel. Through Visual Basic programming within AutoCAD, you can launch Excel and bring the full power of a
spreadsheet application into an AutoCAD drawing session. The information in this series will demonstrate how to generate, organize, query, and
extract linework visibly or behind the scenes during an AutoCAD session without spending a dime on pilers or documentation. If you
have AutoCAD and Microsoft Excel already loaded on your workstation, this technology is ready and waiting for you to take advantage of it.
To enter the world of Visual Basic programming and add Excel functionality to AutoCAD software, you have to be willing to spend the time it takes
to master this object-oriented programming tool. Even if you've programmed in AutoLISP® before, Visual Basic is not as forgiving or as
modating, and the rules that must be obeyed for everything to work right when you run your own VB applications are very strict. This isn't to
say that an AutoLISP programmer can't conquer the world of Visual Basic; it just takes more dedication and effort.
So... as with any serious investment of your time, it pays to step back and examine what getting up to speed on Visual Basic (and the integration of
AutoCAD VBA and Microsoft Excel) brings to your table in the first place. The more you learn about the software you already own, the more
powerful it gets and the more impact it stands to have on your productivity. If the nature of your drawings and designs lends itself to spreadsheet
functionality, then consider setting aside notions of cranking out code, and go Zen with me for a bit as we consider some potentially profound
questions... beginning with "Why should any AutoCAD user care that integration of Auto