Customization Methods in AutoCAD.



Author Mazhar Basa
Profession Civil Engineer
  M.Sc. Comp. Fluid Dynamics
Location Ankara, TURKEY
e-mail  

General proggraming information

There are three different methods that can be used for customization, or in other words programming your own applications in AutoCAD. Below, you can see these three methods as sorted from less complicated to most complicated one.

-AutoLISP Macros (Programming language: VisualLISP)
-VBA Macros (Programming language: Visual Basic)
-ObjectARX and DBX modules (Programming language: C++)

Let’s examine this there methods together…

1-AutoLISP Macros:

VisualLISP is the oldest of programming languages used in AutoCAD. It might be a little bit old fashioned when compared to today’s complicated programming languages. However, it is extremely useful for custom applications that are developed to use AutoCAD’s own commands and for purposed that are repeated several times. Compared to other programming methods, it is the easier to learn and use.

Another one of its main advantages is that it can be used directly as AutoCAD’s original environment and as if it is AutoCAD’s own commands.

2-VBA Macros:

Visual Basic is specially developed for those who do not require a complicated programming language to develop large, complicated applications; but need less complicated and easy to understand and use programming languages. Its usage and learning procedure is much more easier compared to other programming languages.

When compared to LISP it provides wider ranges variations of applications.

Similar to LISP, it includes a VISUAL BASIC Editor which is integrated into AutoCAD. This editor is the same editor that is integrated into Ms Office applications like word, excel that is used for creating VBA macros in these applications.

Probably, it’s greatest advantage is that it can be programmed through other applications like Word, Excel using the VBA editor of these applications and enable all these programs to communicate with each other in a very easy manner.

3-OBJECT ARX DBX Modules:

When compared to others, this is the one that provides wider range of possibilities but on the contrary, that most complicated one to learn and use. C++ programming language is more complicated compared to LISP and Visual Basic languages that is used in other methods.

Other two programming languages are more like scripting languages. They are more efficient to automate basic tasks that repeat themselves. On the other hand, ObjectARX programming uses AutoCAD’s own source code to develop more sophisticated and specialized applications. Due to the fact that, C++ is an object oriented programming language, you can create your own objects that are specialized for special purposes, either by using AutoCAD’s own objects or entirely new. They are more then a script or a macro. By using ObjectARX, specialized programs that run under AutoCAD, which uses AutoCAD’s user interface as its own graphical interface can be programmed.

But all these make ObjectARX applications more complicated. For example simple tasks like drawing basic entities may require only 2-3 lines of code in AutoLISP and VBA, however same task may be programmed by using 100 lines of code in ObjectARX.

Have a nice day everyone.

Similar Posts

Rate this article:

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

4 Responses to “Customization Methods in AutoCAD.

  • 1
    Sascha Langenstein
    January 22nd, 2007 12:33

    Which language do you recommend a beginner to learn?

    Will Autodesk support autolisp in future? Maybe there is no further development for this language.

    What about .net? Will vb.net replace vba?

  • 2
    Mazhar Basa
    January 22nd, 2007 17:47

    Which language you will use completely depends your demands. If you are willing to automate typical processes that you repeat very often, and would like to use AutoCAD commands directly as they are then you should choose to write scripts by using LISP. Or if you want to write simple tasks to communicate with external applications like Excel and/or you don’t have advanced programming knowledge then you should use VBA. Or if you want to create more complex tools and implement your own objects, then you should use ARX.

    I believe that .NET is the future of programming in AutoCAD. It is easier to write and manage code by using .NET. But this is only useful if you want to create complex programs. As far as automation of simple tasks are concerned LISP and VBA are still more applicable. There are still people (like I did in my M.S. thesis) who use FORTRAN. Because it still fulfills their demands and they don’t need more complex programming tools.

    There is a saying in Turkish: “even if it is very cheap, that you don’t need is always expensive”

  • 3
    basheer Ahamed
    January 31st, 2007 08:26

    I use VC++ 6.0 and AutocadRealdwg 2006.i try to Compare two Dwg Files .use acedSSGet() function .this function create error .

    error LNK2001: unresolved external symbol _acedSSGet

    give me solution

  • 4
    fakey
    July 9th, 2007 20:30

    “give me solution”? Are you serious? You think anyone in there right mind would take their time to reply to anyone that demands for an answer?

    Good luck buddy

Leave a Reply