See the top rated post in this thread. Click here

Page 1 of 6 12345 ... LastLast
Results 1 to 10 of 51

Thread: What API should I learn?

  1. #1
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,525
    Login to Give a bone
    1

    Default What API should I learn?

    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.
    Last edited by Ed Jobe; 2007-09-26 at 05:16 PM.
    C:> ED WORKING....


    LinkedIn

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,685
    Login to Give a bone
    0

    Default Re: What API should I learn?

    95% of all lisp created since version 2.6 still works in the current platform and should remain that way forever. ARX must be thrown away and recreated with each platform.

    If you want to create something useful you might need for years to come use lisp, if creating something to sell that you can recharge for with each release use ARX.

  3. #3
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: What API should I learn?

    I've been programming in Lisp since the late eighties (still not very well, ask Kennet!), I find it does for me just about all the things I want it to and in a fairly short code block. Another thing I like about Lisp is that you can self-teach (I'm entirely self-taught), I don't think you can say that about many other API's/languages.

    One other thing about Lisp, and one that I haven't explored enough yet, is that it is based on AI (Artificial Intelligence) programming, there must be some really cool stuff that can be programmed in it that we haven't stumbled over yet.

    The down-side of Lisp? Well, you can't port any of your Lisp knowledge to any other language, as it is just too different. But I still love it!

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,525
    Login to Give a bone
    0

    Default Re: What API should I learn?

    Quote Originally Posted by carl_hd_collins View Post
    Another thing I like about Lisp is that you can self-teach (I'm entirely self-taught), I don't think you can say that about many other API's/languages.
    That's the reason for this thread, to help people decide where to spend their efforts learning. For each, there are tons of resources available via books and the internet. You could simply download a VS Express version for free and use the hundreds of tutorials, videos and webcasts on MSDN. Except for my first class on Qbasic in the 80's, I am completely self taught in a dozen languages.

    For someone just starting, it can be a difficult decision trying to figure out where to start. Yours and Tom's comments kind of fall into my fifth bullet - future goals vs immediate needs. Lisp is a good choice if one only intends to customize acad. If one wants his/her efforts to be transferrable to other areas/programs, then VBA/.NET should be considered to start with. With time, one may learn multiple languages to fill their needs. It largely depends on what you decide your needs are. Someone making a decision may use the material in this thread to assist them in identifying their needs.
    C:> ED WORKING....


    LinkedIn

  5. #5
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: What API should I learn?

    Quote Originally Posted by Ed Jobe View Post
    That's the reason for this thread, to help people decide where to spend their efforts learning. For each, there are tons of resources available via books and the internet. You could simply download a VS Express version for free and use the hundreds of tutorials, videos and webcasts on MSDN. Except for my first class on Qbasic in the 80's, I am completely self taught in a dozen languages.

    For someone just starting, it can be a difficult decision trying to figure out where to start. Yours and Tom's comments kind of fall into my fifth bullet - future goals vs immediate needs. Lisp is a good choice if one only intends to customize acad. If one wants his/her efforts to be transferrable to other areas/programs, then VBA/.NET should be considered to start with. With time, one may learn multiple languages to fill their needs. It largely depends on what you decide your needs are. Someone making a decision may use the material in this thread to assist them in identifying their needs.
    If I was sarting over in AutoCad, I would probably choose VBA, but I am really a "Lispophone" now. If I get the time, I will try and learn the other API languages, because I think that each of them has it's own strengths and weaknesses. I also need to get more up to speed with VLisp, that seems to have plenty of "Extra-AutoCad" commands, but it is not an easy thing to learn, especially for someone like me who would not describe themselves as a programmer.

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,525
    Login to Give a bone
    0

    Default Re: What API should I learn?

    Quote Originally Posted by carl_hd_collins View Post
    If I was sarting over in AutoCad, I would probably choose VBA, but I am really a "Lispophone" now. If I get the time, I will try and learn the other API languages, because I think that each of them has it's own strengths and weaknesses. I also need to get more up to speed with VLisp, that seems to have plenty of "Extra-AutoCad" commands, but it is not an easy thing to learn, especially for someone like me who would not describe themselves as a programmer.
    It definitely takes a lot of time. Hence its wise to plan a route and develop goals.
    C:> ED WORKING....


    LinkedIn

  7. #7
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: What API should I learn?

    Quote Originally Posted by Ed Jobe View Post
    It definitely takes a lot of time. Hence its wise to plan a route and develop goals.
    I thought I had a plan, but then some %&$%U&$%& released Revit and it's all up in the air again!

  8. #8
    All AUGI, all the time Capt. Computer Crasher's Avatar
    Join Date
    2006-12
    Location
    South of North & East of West
    Posts
    786
    Login to Give a bone
    0

    Default Re: What API should I learn?

    I personally like VBA, but still want to learn at least two or three more so I can have some options when creating a macro

  9. #9
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,525
    Login to Give a bone
    0

    Default Re: What API should I learn?

    BTW, I know I've seen some direct comparisons lisp/vba in the past, but I don't recall where they were. If you know, you can post a link. This would also be a good place to itemize them if you want, i.e. lisp is better at utilizing acad commands via (command) whereas vba SendCommand is asyncrnous. Also, lisp runs in the document context while vba runs in the application context and is better at iterating through open documents. After collecting enough input, it could be compiled into a list.
    C:> ED WORKING....


    LinkedIn

  10. #10
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,525
    Login to Give a bone
    0

    Default Re: What API should I learn?

    Differences between LISP/VBA/ARX/NET.
    • Lisp can add commands to the command stack. VBA cannot. .NET can and has far superior options for doing so.
    • ObjectArx (C++) developers provide a platform for lisp/vba, in order for it to exist. The tools you use to work with are written in C++.
    Last edited by Ed Jobe; 2007-09-26 at 05:27 PM.
    C:> ED WORKING....


    LinkedIn

Page 1 of 6 12345 ... LastLast

Similar Threads

  1. What API should I learn?
    By Ed Jobe in forum ARX
    Replies: 0
    Last Post: 2007-09-14, 03:39 PM
  2. What API should I learn?
    By Ed Jobe in forum Dot Net API
    Replies: 0
    Last Post: 2007-09-14, 03:35 PM
  3. What API should I learn?
    By Ed Jobe in forum AutoLISP
    Replies: 0
    Last Post: 2007-09-14, 03:33 PM
  4. How can learn ARX ?
    By trungkien123v in forum ARX
    Replies: 6
    Last Post: 2006-07-16, 01:11 AM
  5. What to learn?
    By madcadder in forum AutoLISP
    Replies: 2
    Last Post: 2005-05-22, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •