4.5 out of 5
4.5
138 reviews on Udemy

AutoCAD VBA Programming – Beginner course

This course gives you a solid understanding of AutoCAD VBA concepts and fundamentals to develop your own applications.
Instructor:
Arnold Higuit
637 students enrolled
English [Auto]
You will be able to develop VBA Applications and create Graphical User Interface (GUI) that interacts with the Users and AutoCAD.
You will be able to draw different AutoCAD Objects using VBA using Forms and User Controls.
You will be able to manipulate AutoCAD Objects and automate repetitive tasks.
You will learn the VB/VBA Syntax and should be able to use it with other Microsoft Office Applications (e.g. Excel, Word)

This course will walk you through the VBA Integrated Development Environment (IDE). You will also learn and understand the AutoCAD VBA Object Model through presentation and examples.

We will cover the User Forms and Controls and explore AutoCAD Database Dictionary

Conditions and Decision Structures will also be covered extensively.

We will be writing actual applications using different VBA Drawing techniques.

You will also understand how to debug and handle errors in your program.

By the end of the course, you should be able to develop your own small to medium complexity applications.

Introduction

1
Introduction

In  this lesson, you will have a high level overview of the course as well as get a glimpse of how and what AutoCAD VBA is. Also, you will get to know the advantages and benefits of using VBA.

2
Course Content Identified

Define the Course Content by outlining every single section of the course. From setting-up the environment, understanding AutoCAD Object Model to Debugging and Error Handling.

VBA Integrated Development Environment (IDE)

1
Setting-up the Environment (Installing VBA IDE)

Discuss the content of the course as well as the requirements for installing VBA IDE. Also, identifying the versions of AutoCAD that requires separate installation of vBA IDE Component.

2
Downloading and Installing AutoCAD VBA IDE.

Walkthrough the process of downloading the VBA IDE Component from Autodesk website and installing it.

3
Identify and Understand VBA IDE Components (Toolbars and Windows)

VBA IDE Components will be discussed in detail by mentioning their respective usage and purposes in relation to your programming experience.

4
VBA IDE Walkthrough

We will examine each of the IDE Components to learn and understand how to use them in our programming as well as know their features and usage that can be very beneficial during code development.

Understanding AutoCAD Object Model in VBA

1
Examining AutoCAD VBA Object Model Structure

We will explore the VBA Object Model Structure and understand how the objects relate to each other and how to use and easily apply them in the code. We will go through several programs to demonstrate how they are being used by going through some of the AutoCAD Objects collections.

2
Examining AutoCAD Object Model Structure Part 2

This is a continuation of the previous lesson where we further examine some of the AutoCAD Objects collections. By the end of this section, you should be comfortable using them and work with those objects with ease.

Using Variables in VBA

1
Working on Variables

This video will explain what are the data types to be stored in a variable and how to declare them.  Also, this video explains how to consume, concatenate and watch values of the variables.

2
Using Variables in the Program

This video will walk you through how to use variables with different data types. You will see 5 different programs that covers every single datatype.

User Forms and Controls

1
User Forms and Controls Topic Breakdown

This video gives the high level overview of different controls and outline the list of Controls to be explored further and see how they work in action.

2
Using Label, Textbox and Command Button Controls

This video explores the Label, Textbox and CommandButton Controls in a simple program. It also explains the User Form and show you how to play with the Control's Properties.

3
Using ListBox Control

This video will show you how to use the ListBox Control and how it gets populated with all the layers in the drawing. 

4
Using ComboBox Control

This video will show you how to use the ComboBox Control. You will also learn how to retrieve the LineTypes in the drawing as it is being added in the ComboBox Control.

5
Using CheckBox Control

This video explores and explains the usage of CheckBox Control in a program.

6
Using OptionButton Control

This tutorial explores the OptionButton Control and compares its usage with the CheckBox Control.

7
Using MultiPage Control

This video explores the MultiPage Control in detail and uses it in the example program to generate an Audit Type Report for all the Fixtures and Doors in the drawing.

8
Using MultiPage Control Continued..

This video is a continuation of the previous one and extends its functionality by creating another page for Electrical Components.

9
Using Frame Control

Frame Control is very useful in grouping different controls in a single container. This video will show you how to use it when you are designing the form.

Conditionals and Decisions in VBA

1
Conditions and Decisions Course Outline

Lists and explains the different conditions and decisions and operators (both Conditional and Logical) that will be explored further in the succeeding videos.

2
IF-THEN-ELSE Condition

This video will show you how to use the if-then-else condition in the actual program using the InputBox to receive value from the user's input.

3
IF-THEN-ELSEIF Condition

Sometimes there are more conditions in the program. This is where the if-then-elseif condition comes in. This video will show you how to use it by validating/checking the object type selected from the drawing.

4
Conditional Operators in VBA

This video will show you how to use different conditional operators in an actual program. You will have a good understanding how those conditional operators work and how to use them accordingly.

5
Logical Operators in VBA

There are cases where you have to validate the program in more than one condition. This is where the logical operator works. This video will show you how to use AND, OR and NOT operators.

6
SELECT CASE Statement in VBA

Another way of handling different conditions is by using Select Case Statement. This video will show you how to use it in the program.

Looping and Iterations in VBA

1
Looping and Iterations Overview

This video explains the 4 ways of using Looping and Iterations in your program. You will have a high level understanding on those 4 different ways.

2
Using DO-WHILE Loop in VBA

This video will show you how to use the Do-While Loop in the program by looping through the objects in the AutoCAD drawing. You will learn how to loop through the selection set as well as how to use the counter.

3
Using DO-UNTIL Loop in VBA

This video will show you how to use the Do-Until loop and describe the differences with the Do-While Loop.

4
Using FOR..NEXT Loop in VBA

This video will show you how to use the For..Next Loop. It is the simplest form of looping in VBA and you will see it in action.

5
Using FOR..EACH..NEXT Loop in VBA

This is a very interesting video where you will see how to use the for-each-next looping structure by going through each of the Layer in the AutoCAD Dictionary. Also presented is how to loop through the LineTypes in the drawing.

Drawings Objects in VBA

1
Drawing Objects Overview

This video provides a high level overview of objects to be drawn in this section.

2
Draw a Line Object using Utility Function

This video will show you one way of drawing a Line object based on 2 points that uses the Getpoint function.

3
Draw a Line Object using Points from User's Input

This video will walk you through how to get input from the user. Also, you will learn how to validate the values entered. You will learn lots of programming techniques from this video.

4
Draw a Circle Object Using Utility Functions

This video will show you how to draw a circle by using the Getpoint and Getreal Utility functions.

5
Draw a Text Object using Utility Functions

This video will show you how to draw a Text object by getting the values from the user's input using Getstring, Getpoint and Getreal Utility functions.

6
Draw a LWPolyline and Polyline Objects

This video will show you how to draw both Lightweight and Heavyweight Polylines. You will also learn how to declare an array of doubles that will be used as a storage for the vertices.

Code Debugging in VBA

1
Code Debugging Overview

This video gives you the high level overview each topic to be covered in this section.

2
Code Debugging in VBA Demo

In this video, we will walk through the actual code debugging using the complete application to draw a text based on the user's input. You will also learn how to make changes on the Form control based on the user's action.

3
Code Debugging in VBA Demo Continued...

This is a continuation of previous video. This also show you how to create a separate sub method by calling it from the Click event code generated by the form. You will also learn how to step through/over/out of the code.

Error Handling in VBA

1
Error Handling Course Outline

This video lists all the different ways of handling error in VBA. This also outlines the types of error that VBA have. The Err object is also mentioned.

2
Error Handling in VBA Demo

This video will walk you through the process of handling error and how to remediate or fix them once encountered. This will also give you some technique on how to accept or validate user's input.

Conclusion

1
Conclusion and Thank you!
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.5
4.5 out of 5
138 Ratings

Detailed Rating

Stars 5
54
Stars 4
47
Stars 3
28
Stars 2
5
Stars 1
4
b2071b7b361034ace1dd0ef866e5a839
30-Day Money-Back Guarantee

Includes

4 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion