This is a commonly asked question. Especially since .NET came out, because now you have the choice of another api and multiple languages to choos from for the same api.
Disclaimer: The intent of this thread is not to debate/berate one language over another. Each has strengths and weakneses. It is to identify those and assist a beginner in making a decision on where to put their effort. I'm not the ultimate authority on this, but have observed this topic for awhile. Also, this is just the first post. If I left something out that will help them to make a decision, feel free to add to this thread.
This question is not easily answered. There are a several factors that might influence your decision. To name but a few... I may update this list later as the thread develops.
- Professional Developer vs. Do-It-Yourselfer (the vast majority fall into the latter category)
- Requirements of the task itself
- Limitations of the api
- Personal experience, background, training, etc.
- Future goals vs. immediate needs, e.g. customize acad only or other apps. or standalone app.
For professional developers, the choice is simple. Choose the .NET api and either VB or C#. C# seems to be the preferred language since it is similar to C++, which is required for the ObjectArx api. This api allows you to develop AutoCAD apps at the lowest level of integration. The most common reason I know of to use this api is the need to create custom objects/entities. The .NET api is a wrapper for most of ObjectArx. Thus .NET is the next most robust api available. This has the side effect of making it very daunting due to its complexity, which is added to the complexity of the CLR (the Common Language Runtime is .NET's api for the Window's operating system and is huge in itself.) Not to scare you off, but don't expect to just jump into .NET without some serious book time. You're not going to learn it just by asking for code samples. And you will have to learn it, because code samples alone, while important, are not enough to get your job done.
Most of us fall into the do-it-yourselfer category. Some may have more programming training than others, but we don't get paid specifically to program. Our job is CAD. The focus usually is getting the task done economically. This means that we take shortcuts on education and whereever we can, i.e. we use what's free when we can. In terms of IDE's that means lisp or VBA. Hopefully, in the future, that will include VSTA (Not Vista the operating sytem, Visual Studio Tools for Applications, the next gen of VBA). Some want to have a list of what each api is capable of, or what it isn't. While that is helpful, I don't worry about it too much. Most of us usually just stick with the api we are comfortable with and find workarounds when we hit one of those areas where the api is weak. Sometimes you incorporate both api's. Many self-taught programmers end up learning multiple languages. However, since this thread is designed for beginners, they usually want to know where to start. That can be split up into two directions. The first group doesn't want, or doesn't have a lot of resources to spend and only wants to learn one language. The second wants to be a serious programmer and just wants to know where to start.
For the first group, I recommend going with VBA. First, the IDE is much more robust than the IDE for VLISP. Second, it is much easier to develop ActiveX in VBA. This will allow you to develop in other software applications that support VBA, leading to the third reason. It gives you the most value for the time you spend learning. MS Office is the most common apps that we tend to customize in addition to acad. Fourth, you can leverage this knowledge if, in the future, you decide to move to .NET. While its true that VB6/VBA is not being developed by MS anymore, I don't see it going away anytime soon because of the huge following of users who are just like I have described.
For the second group, I recommend also learning lisp. You can write some things with much less code than vba. Particularly if it involves utilizing an existing acad command. This is more like scripting, but very efficient. Why write code that's already been written? Visual Lisp is lisp that has been highly customized for AutoCAD, while VBA is a generic language that uses an object library for acad. Some may feel that lisp can do more than VBA, while often its just a case of having a function that's already been written in lisp when you may have to write that function yourself (or find one someone else has written) in vba. Also, lisp is helpful for executing your vba. I started out with lisp for about 5 years before vba came out. Although VBA is my preferred language, lisp is very helpful. Its easy to learn and be productive right away. Hence its popularity. Its not dead either, due to the database nature of acad, which is easily presented as lists of data.
Hopefully, this will get things started if anyone has anything else to add.