Re: What API should I use to customize Autocad?
Currently, I fluently program in two languages - LISP and VBA. Dot-Net is something I'm trying to squeeze in when I have time *snicker yeah right*. The basic decision method of what to use for programming is this:
- if its needed RFN, only needs to work in a single drawing, and/or is only moderately complex, that gets done in LISP. Its fast to write and relatively forgiving.
- if it must run across multiple drawings ("batch" processing), and/or requires complex dialogs, and/or requires complex interaction with Excel or Access files, then it gets done in VBA. Its not quite as fast to set up as LISP, but has better dialog support, there's no fiddling around to get it to run across multiple drawings, and its easier to connect to other data-using programs.
- if it is a complex application which requires massive amounts of data handling, then that is going to be done with .NET (provided I can get going on it). Incredibly complex but with that complexity comes tools for handling virtually everything - XML data, SQL databases, multiple threads for concurrent processes, data manipulation for any kind of data you can get your hands on or create.
One of the downsides of using .NET is future support. Not many CAD support personnel know (or care to learn) .NET, so if a core in-house customization is written with it and the originator is no longer around, migrating that code to a new AutoCAD release could be quite difficult. On the other hand, virtually all CAD support personnel have exposure to LISP, and many know some VBA as well.
Re: What API should I use to customize Autocad?
When I first saw this thread, I thought "this is going to end in a slanging match". It's a shame, because I think that Ed has raised a very good, valid question; "why do we use what we use?". At it's best, this could open up some new languages and techniques to those of us who are firm believers in our chosen API.
Unfortunately, people (and I include myslef in this) are very defensive of "thier" language. Being a Brit on a mainly American forum, I am more aware of this than others may be (that is meant in a light hearted way, I don't want to start another arguement!).
As Kennet rightly said, these API's may not be around forever. In fact I would go further and say that they all have a finite lifespan, this world changes at a blistering pace and it is all we can do to keep track.
Many of us older CAD hands learnt to program when the choice was Lisp or DOS Batch files, each had it's place, each had it's own (rather cutely small) command set and we all knew what was what. Now we are faced with a bewildering array of languages, all of which have their strengths and weaknesses, as so eloquently put by "dgorsman" (sorry, I don't know your real name).
My last word (for a bit, I'm not going away any time soon, I like this thread :)) is that we should all embrace the differences we and the API's have, surely collectively we are better than individually, maybe even more than the sum of our parts.
Keep the bit-fires burning! ;)
Re: What API should I use to customize Autocad?
Ed
Isn't it true that MicroSoft are no longer developing or supporting VBA?
http://msdn2.microsoft.com/en-gb/isv/Bb190538.aspx
I'm not sure of the full implications of the above link, but it doesn't look good!
Re: What API should I use to customize Autocad?
Notice that it doesn't even affect MS Office. It will continue to include vba. This only affects new "customers". Autodesk is an old customer. However, don't expect anything in the ActiveX api to get fixed. You have plenty of time to migrate to .NET. I would expect that when VSTA is finally included in acad, that vba will remain for a while longer. There is a huge investment in ActiveX and that won't just disappear overnight.
Re: What API should I use to customize Autocad?
Some related links to this topic:
Re: What API should I learn?
Hello,
I believe that, if I had to re-do it again, I would follow the same path : macro, Autolisp, vlisp and when I've enough time, vba. I keep C++ for self made program. I don't use C++ with Autocad, the C++ API is not free and change too often.
I think that it's very important to begin with macro "(command "layer"..)" to enter the other side of Autocad to get quick results. Especially as most of us are users first.
my 2c
Re: What API should I learn?
Just a reminder to everyone.
By proceeding to post on AUGI's Forums you agree to these guidelines and must obey them at all times.
Please keep the discussions friendly.
Richard
Forum Moderator
Re: What API should I use to customize Autocad?
Quote:
Originally Posted by
Avatart
I thought I had a plan, but then some %&$%U&$%& released Revit and it's all up in the air again! :lol:
As it seems most here of the older CAD generation have done, I have also grown up with Lisp and so far all of my programming is geared around it. A very simple language that one can do some amazingly complex tasks with. The CAD Gods only know my code is not the best, but am happy with all of my results. :D
I've been tasked with looking into Revit and I am curious on what your plan of action might be. I've begun to learn C++ and will be taking a VB course soon.
Re: What API should I use to customize Autocad?
Quote:
Originally Posted by
ken.ferguson
I've been tasked with looking into Revit and I am curious on what your plan of action might be. I've begun to learn C++ and will be taking a VB course soon.
Good point. So far, this thread is geared towards AutoCAD based products. Revit, of course doesn't support lisp. NET is the way to go.
Re: What API should I use to customize Autocad?
Quote:
Originally Posted by
Ed Jobe
Good point. So far, this thread is geared towards AutoCAD based products. Revit, of course doesn't support lisp. NET is the way to go.
I think in my case it is just fear of change that is worrying me, that and the huge task of learning a programming language from scratch. It's taken me about fifteen years to get where I am with Lisp (and, truth be told, that's not very far!), now I've got to do it all over again in .NET or VBA or C++ or whatever.... :(
Everyone seems to chant the mantra "Change is good, embrace change", I'm not actually too convinced by that.