From AutoCAD VBA Programming: Tools and Techniques

Although VBA programs run inside of AutoCAD, they also run inside of windows, and there are times when an application needs to perform tasks related to the operating system. This is where VBA greatly exceeds the abilities of AutoLISP. You can talk to Windows by calling functions that are available as objects and utilities to your programs.

What's an API?

API is an acronym for Application Programmer's Interface. The Windows Application Programmer's Interface is a set of functions built into Windows that allow you to access the system's registry and INI files. Microsoft has included a robust set of information about the system in the registry, and you can write more exotic applications using this information. You can write sound generator programs or programs that animate the desktop or draw on it. Windows API is a whole world unto itself, and many a career has been made learning and using it.

AutoLISP programmers have not been able to access the Windows registry and therefore have limited or no experience with this rich environment. You can access any information stored in the registry through the API calls. This includes ActiveX information about other applications or even information about your printer or plotter. It all depends on the vendor setting up the information in the registry.

An example is AutoCAD and AutoCAD LT. AutoCAD is an ActiveX client and server. It can make calls to other applications, or it can receive calls from other applications. It has a switch that can be...

Copyright John Gibb and Bill Kramer 1999 under license agreement with Books24x7

Products & Services
Conduit Fittings
Conduit fittings are connectors and fittings used to connect one piece of conduit to another, or to connect conduit to an electrical box. They are available in various metals, as well as with different levels of moisture protection.
Pneumatic Fittings
Pneumatic fittings are parts used to connect sections of pipe, tube, and hose in pneumatic (pressurized gas) lines and systems.
Hose Fittings
Hose fittings are a category of components used to connect hoses and tubes for in-line, offset, multi-port, and mounting configurations.
Hydraulic Fittings
Hydraulic fittings are parts used to connect hoses, pipes, and tubes in hydraulic lines and systems.
Tube Fittings
Tube fittings connect runs of tubing for in-line, offset, multi-port, and mounting configurations to other tubing sections, pipe, hose, and other fluid transfer components.

Topics of Interest

While VBA has many built-in functions for manipulating strings and other data types, it's still up to the programmer to create support functions for those situations that the VBA language does not...

Threaded fittings mate via male and female connectors that screw together. Threaded fittings are available for pipe, tubing, valves defined as NPT, NPTF or BSPT fittings. Threaded metal connection are...

A Brief Explanation of ASTM Standard Specifications ASTM D-1784 Rigid Poly Vinyl Chloride) (PVC) Compounds and Chlorinated Poly (Vinyl Chloride) CPVC Compounds This specification covers rigid...

MDC Del-Seal™ CF fittings such as nipples, half nipples, reducer nipples, flexible nipples, elbows with 45° and 90° configurations, tees, reducer tees, crosses with four-, five- and six-way...

Manifolds are common auxiliaries in a plastics injection molding shop. They are key components of mold water cooling circuits. Their primary function is to route cooling water from the tower or...

Product Announcements
Plasti-Bond/Perma-Cote/Korkap
Plasti-Bond/Perma-Cote/Korkap
Plasti-Bond/Perma-Cote/Korkap