18, Feb, 2019

AutoCAD Drawing Automation : Part 1 – Create custom toolbar and button

Autocad drawing automation_0

AUTOCAD DRAWING AUTOMATION FREE TUTORIALS

In this tutorial, we will see how to create your own command button and insert it to the custom toolbar (name it under your organization/institution). when you click on those buttons, it can perform certain pre-written actions like draw objects, add dimensions, change properties, change drawing scale, printing, export to other data formats like excel/access database. there will be more tutorials on each subject soon..

Now, let us begin with the basic toolbar/button creation

PART 1 : CREATE CUSTOM TOOLBAR and BUTTONS

STEPS

Step 1 : Create a new CAD Drawing and Save it

Step 2 : Open VBA Editor (Tools->Macro->Visual Basic Editor (see below image)) by Pressing ALT + F11

autocad vba

Step 3 : Insert a module (Module1) – define your functions and save it

Step 4 : Right click on AutoCAD window, then select “Customize” (see below)

Step 5 : Create a new command and name it then add its macro command

eg :- ^C^C_-vbarun;Module1.functionname

Step 6 : Create a toolbar and name it, then drag the new command from the commands list to the toolbar section (under newly created toolbar)

Step 7 : Save it (dont forget to load the project, while opening the new cad drawings – refer previous articles to find out how to do that)

DONE !

Keywords : Autocad design software development CAD Software Custom cad software development insert custom command for autocad autocad customization autocad vba projects

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>