Articles > AutoCAD VBA

Introduction:



One of the tools for AutoCAD customization is AutoCAD VBA (Visual Basic for Applications). It is a subset of Visual Basic 6.0 programming language. AutoCAD have inbuilt Visual Basic IDE (Integrated Development Environment). AutoCAD Component Object Model (COM) is accessed using VBA & desired results are achieved.


Advantages of AutoCAD VBA when compared with AutoLISP



- Creation of user interface is very simple. It has ready-made controls, which can be clicked & drawn on form. User interface can be very easily designed.
- You don’t have to worry about parenthesis.
- Visual Basic is versatile language, once learn, can be used for other types of software development.


What to choose: AutoCAD VBA or AutoLISP?



It depends on what exactly to be achieved. There are different scenarios, which can be considered.

1. If you don’t have any programming experience. Want to learn AutoCAD programming by doing self-study. Want the result fast. Have doubts about your programming capabilities. In such a case AutoLISP is recommended. Once confidence is gained in programming, other programming environments can be explored.

2. If you are comfortable with Visual Basic programming. Done some other developments with Visual Basic. Knows how to use Visual Basic for application development & Have good working level knowledge of AutoCAD. In such a scenario AutoCAD VBA is recommended.

3. If it is possible to join training classes to learn AutoCAD customization then AutoCAD VBA is good to start with.


Whether learning Visual Basic is necessary for AutoCAD VBA?



If you have not done any programming before, then learning Visual Basic is recommended. It helps in developing the programming capabilities. It clarifies your basic programming concepts. It gives knowledge about the building blocks of any program such as variables, decision making, loops, array, functions, file handling, error handling etc.

Visual Basic can also be used for other types of software development, which gives an added advantage.