AutoCAD VBA Programming Tutorial

AutoCAD VBA Programming Tutorial. This tutorial shows step by step how to create a program in AutoCAD VBA. In this a program is created to draw rectangle by accepting width & length as input from user. This is a good starting point for those who want to learn AutoCAD VBA.


李義成 says:


araki916 says:

nice tutorial. I’m getting into VBA for autoCAD. do you have any books or sites?

Rehaman A says:

use full for create a design program

Alexis Golzman says:

This is just what I was looking for, thanks for uploading!

payan payan says:


Anand Kumar says:

why are you using the pi / 2 ….?
Please explain…:)

Mikael Akkus says:

hey please send me study documents..thnx:))

neemx yang says:


hazel head says:

Hi – can you do a tutorial on drawing a around that rectangle please?

Nimish Parikh says:

For value of pi, you should use pi – 4*atan(1), where atan is inverse of trigonometric function tan. That way you get most accurate number as calculated by system. Of course, for large programs, it should be initialized once the program is loaded. Also, you can initialize variable like pi_2, 3_pi_2 etc. that represent values of pi/2, 3 pi /2. That way your program will perform better during run time.

Issam Mahmoud says:

I use Visual 6 and I want to import the block name of Alaotkad Code

Chinh Nguyễn Văn says:

people to ask programmers rectangle 1listbox and 1 textbox and how ?

Chandrashekar Rao.K says:

Thank you so much Sir …it was excellent for which i was searching…

Rishi Doshi says:

very good sirji. thanks

pulak samanta says:

hi sir i am looking for some auto cad program can create it if possible please give your contact details

GameReality says:

How do I create a “ThisDrawing” in solidworks ?
It is above “UserForm1” on the left .
I guess that is what is needed in Solidworks to be able to do the same.

Does anybody know?


Faheem Akhter says:

hi thnx for this tutorial.i am a beginner in VBA-CAD. and ur tutorials r goin to help me alot…i have got an issue in running this programme.. i wrote the same code and it is running as well but at the end whn i finish entering x,y points and click GO it gives an error message tht RUN TIME ERROR-(some code)
every time any programe i run i get this ,,and debugger locates at line 26 as in ur code window. i need ur help to solve this prblm plz…regards

Rosário Dilo says:

Hi, i would like to read a text with vba and present it in a textbox in my userform. Can you say me the macro for that?

wojciech765 says:

For the first step it.s very good introduction Good job and Thanks

Bagus Dewantoro says:

Hi there..
Is it possible to change hatch layer via excel input through VBA?
I have a plaza floor plan with each hatch for each unit (room) to represent unit type. I also have an Excel spreadsheet that contains room number in column A (001, 002, 003,…, etc) and unit type in column B (Small Shop, Food, Hypermarket, Cinema, Department Store, etc).
Is is possible to update layers in AutoCAD automatically when we change unit type in column B?

GameReality says:

Can you do this in solidworks for us.

Asif Saudager says:

wow. helpful

Issam Mahmoud says:

Is there a course teaching linking Visual 6 Balaotocad

Timothy Streib says:

I have gone over this tutorial multiple times and it keeps giving me a Run-time error ‘424’: Object Required. please tell me why this is? Thank you

roaringleo57 says:

Thank you, this worked great even in AutoCAD 2000i

Rehaman A says:

dear sir, I need to create on VBA Program please help me…

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!