A learning path for newbie programmers

I'm working to develop a "learning path" for people who know one or more Autodesk products from a user perspective but are interested in getting more into programming them: perhaps during their engineering studies they took one or two programming classes (perhaps not), and now feel that implementing some level of automation would be beneficial to themselves or to their colleagues. Or perhaps their boss has just told them to find out how all this stuff works. Or – and this is an altogether more sobering alternative – they have recently lost their jobs and are contemplating a career change, taking advantage of the Autodesk Assistance Program to get access to Autodesk software and are looking to complement existing design skills with the ability to customize and develop for our software.

I'd really like to hear your opinion on this topic, whatever your own personal motivation for learning programming. I knew programming before I knew AutoCAD, so I came at this from another direction and to some degree find myself too far along my own learning path to properly assess the current tools for learning programming fundamentals (it was just so long ago that I went through this myself). So this post is really a call for help: if any readers of this blog have recently tried to learn how to program for Autodesk software (or any software, for that matter, as I'm most interested in the resources related to the core programming fundamentals, rather than the product-specific side of things) then I'd very much appreciate you letting me know what worked for you and what didn't.

Some examples: Microsoft provides an online learning service called Ramp Up – have any of you tried it to learn programming with .NET? What good books or – ideally – free resources have you used to get started with programming? Please post a comment or send me an email.

24 responses to “A learning path for newbie programmers”

  1. Ramp up is indeed a great start for Microsoft technologies, but can be very overwelming if you dont know what you're looking for.

    In my opinion, people starting to program with AutoCAD should have notice or skills in following subjects:

    - Knowing what .NET is about, what COM/Interop is, so a very broad overview of .NET technology.
    - Knowing bacics on programming and OOP: classes, types, value & reference types etc, etc...
    - Knowing how to do user interaction => Winforms/WPF, Events etc.

    Those are the very basics of programming and the least you should know (imo 🙂

    So when applied to AutoCAD programming they can get into the events, palettes, commands and logic pretty quickly.

    I'll look into what I've bookmarked on basics, but anyway, there are plenty of free resources around on .NET.

  2. Can u write a handbook of how to do in AutoCAD.Net?

  3. Kean Walmsley Avatar

    An AutoCAD .NET Developer's Guide is in the process of being written and should be available this summer.

    This blog will hopefully continue to complement the material available in that guide.

    Regards,

    Kean

  4. I've only taken one programming class, 12 years ago, as an elective to my drafting courses. It was in C. I barely remembered it when I got into programming VLISP after attending CAD Camp in 2005 (Lynn Allen was really great at explaining it to everyone in a way that I could understand). After that, I learned by reading the help files that came with AutoCAD/Civil 3D. When I moved to VBA, which was harder for me to grasp, I only read the help as I needed to know what I was trying to do at that time. The intellisense really helped me grope my way thru the first few routines I made.
    I tried to make a few palette based apps in 2006/2007, using Visual Basic Express 2005 and a trial of the Visual Studio 2005. Again, I only used the help files as I needed, and the online library in VS05 helped alot.
    However, in the past year, I've only worked on one application, stand alone from AutoCAD, a basic project management tool that I use to track project numbers and status in an xml file that I stylized and embedded on my desktop. I use VSE08 for that app, since it has the better handling of xml than previous versions. I'll tell you, using VSE08 is so much easier than the xml reader I wrote in VLISP 4 years ago.

  5. I found that examples are extremely useful in getting stuff to work. Learning VBA was relatively painless because there are many examples available. Programming vb.NET has been much more challenging because of the lack of examples. Making it more difficult is having a blend of COM and .NET objects (working in Civil 3D), which makes it hard since there are few examples of comingling the code. For instance you can access a AECCSurface as a COM object and a .NET object, but the .NET object doesn’t have all of the properties and methods of the COM object.

  6. One of the more recent discoveries I've made is Design Patterns. These may be a little challenging for beginners, but are an important part of developing applications. I have an Architecture background and have picked up programming on my own. So this is one of the things that programmers probably get early on in their education, but I'd never even heard of until recently.

    Also, by seeing examples that you've posted and some of the labs I've attended, coding style seems very similar and uses techniques that I wouldn't have picked up on my own. One example is passing ObjectIDs as parameters to functions instead of the actual object. Maybe there's some reason for this beyond what I would pick up on my own. What are your top 5 or 10 best practices for developing applications on top of AutoCAD? Using transactions, etc...

    IMHO, these are necessary for beginners to learn and I wish I'd had these lessons earlier. Actually, I still need them. 😉

    Thanks for taking on this project!

  7. I'm with you Christopher! I have a good handle on VB/VBA but have really struggled with any learning of .net.

    Examples are kind of where I cut my teeth and a few VB books I bought. I have 2 .net books at home. I can read through them and get the gist, but sitting down and trying to wrap my arms around it has been "challenging".

  8. Jason Roberts Avatar

    Hi Kean,

    I've been following your blog for a few months now and like the stuff you do, you show us things that are useful and relevent to my profession. I do not know how to program, but I am very keen to learn so I might be able to make my drafting easier and more effective. Since we are a small firm here in Australia (Tasmania) we do not have much resources for training, and self training is a must for me.

    If im stuck with a problem that I need to resolve, I search the AutoCAD help files and the Autodesk forums. I have found them a very useful tool. Apart from buying lots of books on the subject matter that im looking into, I find a small amount of information (free) and then work on trying to teach myself.

    So I guess, the best material that you could possibly provide is some basic knowledge and then get the readers to try and do it themself, and use free tools from the internet, until they think it is worthwhile to buy some better software.

    So thankyou for providing your blog to us the readers, keep up the good work, and I look forward to seeing the training material in the future.

    Jason Roberts

  9. @Danny: I also think design patterns are very interesting. But I think that's another level of programming. You cannot grasp patterns before knowing inheritance and having some experience with .NET (or any OO language) programming. They provide benifits and a common way of working, but I think without basic knowledge or experience, those are hard to see.

    But indeed, after you know the basics, you could learn a bit more on them, but people should then also learn a bit more on TDD and Unit testing, DDD, and many other buzzwords :). I believe those can significantly improve your programming skills, but are not really needed basics to get you going in AutoCAD .NET.

    What I did forgot to mention was, as Adam mentioned, other basics as Xml IO, Data access and the likes. Those are pretty basic concepts you should know for writing any application actually.

  10. Kean,

    You're correct, design patterns are a bit much for a beginner, but I like your other suggestions, inheritance, encapsulation, other OO techniques. While anyone can program poorly, I do it all the time ;-), having good structure to your programs is essential even for short ones like the ones you post. There must be a reason that even the shortest apps will likely have multiple functions or multiple classes in them. What are some basic decisions to I should have to make about my application's structure? (No need to answer here)

    Now, I need to go look up TDD, Unit testing, DDD...

    Thanks again.

  11. Danny -

    The comment was from bertvan, not from me. I don't want to take credit for bertvan's helpful insights. 🙂

    All -

    This is great stuff - thank you all for your contributions (and please keep them coming!).

    Kean

  12. My current favourite programming resource is http://www.stackoverflow.com. It's a programmer community Q&A site for all levels and disciplines.

    There are a lot of newbie questions on there so it's definitely worth a browse & search. There are nearly 200k questions on it at the time of writing. No, I'm not on commission - I just really rate it.

    There is a book on VB.NET in AutoCAD available at http://www.vbcad.com. It's a couple of years old but worth a look at for beginners.

    Hope the helps.
    cheers
    Ewen

  13. Diego Ordonez Avatar

    Hi. I have developed external applications for Autocad with delphi for a couple of years mainly for public utilities network digitizing and administration. Actually i'm really interested in developing internal applications like such made with ObjectARX or .NET. It looks very useful and easier to follow the .net path but i have read that only with the C++ ARX approach is it possible to create customized objects. It is still true ? if so i will take the C++ path, but if not i'd really like to follow the .NET solution to build my present and future projects.
    There are not enough materials nor books available for this subjects. There is a book of ObjectARX but it is a little bit out of date (Jan 19 2000).

    Thanks a lot !!

    Merci beaucoup !!

  14. Kean Walmsley Avatar

    Diego -

    AutoCAD 2010 introduces the Overrule API for .NET, which goes a long way to eliminating the need for custom objects developed using ObjectARX (C++).

    I strongly recommend against adopting custom objects (which are *really* hard to develop), if you can avoid it.

    Regards,

    Kean

  15. Diego Ordonez Avatar

    Ok. According with your rapid response, it looks like the correct path is afford .NET to build AutoCAD custom applications.
    I only hope that there is soon available books or materials to study AutoCAD C# customization.
    Your idea to have an Autodesk "Learning Path" sounds great. I am ready to take it.

    Greetings from Canada.

  16. AutoCAD introduced me to programming. First LISP then VBA and now C#.NET.
    What works best for me is seeing the results sooner rather than study every detail of every feature of the API. I know that makes some "real" programmers cringe. But coming from a production environment I had to show results while I was still learning.
    I believe there is a way to both get quick results and to teach the big picture.
    For example a lesson on selecting objects could double as a lesson in more generic topics. Like a class that has methods that show how polymorphism works. That would give the learner a class that they could use, reuse and refine.
    Another example that comes to mind is Attributes. They get read and written all the time. A lesson on attributes could double as a lesson in how enumeration works.

  17. Hi Kean, this is a really great idea. I will second the Stack Overflow recommendation, I find when I google for solutions to problems (in Python, Perl, C# or Java), there's usually a couple of Stack Overflow links on the first page, and there's an answer to my question 75% of the time.

    I came at .NET / C# with a java background, so it was pretty easy to pick up - though I did find several on-line tutorials useful as refreshers (eg: csharp-station.c...)

    The MSDN library has also been invaluable. It's a firehose of information, but if you're learning .NET, you really need to figure out how to navigate the help to find what you need.

    I also agree with Christopher's statement about examples. As the Civil 3D API documentation guy, I'm trying to get more examples together, as this is the #1 request we hear from customers. The dotnet samples shipped with the ObjectARX SDK are the first place I go to look for code that I can grab and get up and running with (ditto for Through the Interface code).

  18. Justin Ralston Avatar
    Justin Ralston

    Hi

    Greetings from New Zealand

    I am a Civil Engineer and did a final year project in programming excel with VBA to do structural engineering calculations this got me started in VBA which I used a lot in the first couple of years of my career with MS office products.

    Due to a lack of drafting staff in our industry I started to program Autocad to automate a lot of basic tasks.

    Since then I have just read a lot and as mentioned by others I find code examples the best help as once you understand the code synatax and IDE you can usually figure out whats to be done and use the code examples as the base to start with.

    I have just started programming a little bit in VB.net with Civil3d using a really good AU paper from 2007 as an intro and the VB.net book mentioned earlier. But the lack of shipped .net examples makes things a bit slower.

    Regards

    Justin Ralston

  19. i am beginner and would like to go thourgh th edatabse strucutre Can i get AsdkInspectorVC8.arx please.
    Thanks in advance

  20. Kean Walmsley Avatar

    Not without you providing your email address (instead of your TypeKey account), Abhijit.

    Kean

  21. Hi,
    I seem the video that use AsdkInspectorVC8.arx for browsing through the database. I wonder why Autodesk does'nt gave the arx files for free, i'm sures it will help many people that program Autocad.

    if you require email please sent to my email

  22. Where can I find the AsdkInspectorVC8.arx used in your "Introduction to AutoCAD .NET Programming" demonstration?

    Thank you.

  23. Hi!
    I am building a website especially for AutoCAD-programmer-beginners. The address is thecadprogcp.blogspot.com. It mainly features a collection of links to the most interesting/important ressources out there, since there is so much scatterd thruoughout the net.

    I already had it in German for a while but now am translating it to English. The English version is still in is starting phase but it may already be interesting for the one or the other.

  24. I have very basic programming skills and can barely understand this blog LOL. I have created lisp to automate multiple levels in AcadArch and was surprise at how easy It was to implement it and how well it works. After downloading some lisps tut's of the net and started learning I decided to have a go at the 'path' one OOTB and was very angry at doing a lot of typing to learn very little. That is a VERY POOR tutorial indeed. Even though I could do some simple lisp I had no idea what I did and it didn't explain anything - waste of time. Being older and sleep deprived makes learning difficult but slowly I get somewhere. These other languages freak me out. My suggestion is start small steps, with success available each time and avoid anything remotely like the garden path tut. Then we can understand and will continue on the journey with you.

Leave a Reply to MJohnston Cancel reply

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