AutoCAD VBA Programming: Tools and Techniques

How does VBA stack up against VB? Remember that VBA is a subset of VB (actually VB is an add-on to the VBA core). As a consequence, VBA does not have all of the abilities of VB. In this chapter, we will explore those differences and explain how VBA fits into the AutoCAD development scheme of things. We will then turn our attention to building help files for your applications. Help files are often the best way to avoid technical support phone calls for sophisticated applications. We will discuss the differences between the help systems of VB and VBA along with how to create help files.
As you've already seen, VBA is a powerful tool, but there are others that are even more powerful, such as VB and ObjectARX. These tools are not supplied with AutoCAD; you'll have to purchase additional software and learn more skills for them to work properly.
Table 11.1 illustrates some of the pros and cons of both languages.
| VB | VBA | ||
|---|---|---|---|
| Pros | Cons | Pros | Cons |
| Runs outside AutoCAD | Runs outside AutoCAD | Runs inside AutoCAD | Runs inside AutoCAD |
| Easy database connectivity | Shared footprint | Limited database connectivity | |
| Compiled | In-process application performance | Not compiled | |
| Sophisticated UI features | Sophisticated UI features | ||
| Database support (Enterprise Edition) | Purchased separately | Included with host application | |
| DAO 3.5 support | Project file encryption |
All languages have limitations and strengths. The fact that VB applications run outside the AutoCAD...