Customize Autodesk Inventor API using C#

In continuation of previous post on Introduction to Inventor API and Customization, this blog post will show some insights on how to customize Inventor API using Visual C# and Visual Studio 2005.

It is assumed that you have installed Autodesk Inventor (Version 10 or above) and Visual Studio 2005. As per the discussion over Inventor Customization forum, it is suggested that you have Visual Studio 2003 or 2005 for the Inventor Addin Template to work properly. At present, Addin Template does not get installed in Visual Studio 2008.

To get started with Visual C# and Visual Studio IDE (Integrated Development Environment), watch the following Videos from MSDN Library.

  1. Introduction to Visual C# 2008 Express Edition. Though we would be using Visual Studio 2005 for our development purpose, Visual C# Express Edition has similar functionality as Visual Studio. In this video, basic understanding of how an IDE works could be gained and also how C# programs and projects are developed and built.
  2. Introduction to C# Programming Language. This video shows how to develop C# applications using Visual Studio 2005. It is highly recommended that you download this package installer and upon installation on your system, you have a copy of Video downloaded and also a MS Word Document which is basically a transcript for the Video and also explains Basics of C# in a very good way.

I hope you also have downloaded DevTv: Introduction to Inventor Programming from Inventor Customization Page. In this video, Mr. Wayne Brill of Autodesk has explained API concepts very well, but they are either in VB6 or VB.NET. I would like to highlight to the audience that even in Inventor Programmers Help (Located in Help tab), most of the code examples are given in VB.NET or VBA.

I would try to bridge the gap by giving out equivalent C# code in the blog posts to follow. You may also be interested to check out a free VB.Net to VC# translator I stumbled upon, though I haven’t used it yet.

2 thoughts on “Customize Autodesk Inventor API using C#

  1. Hi Rajeev! I found your site through the Inventor Customization discussion group. I am brand new to programming and am focusing my learning efforts on C# so I am loving your site! Something to note that I have discovered; Brian Ekins (the Inventor API architect) has his own blog (http://modthemachine.typepad.com/) and he has posted the Inventor templates for Visual Studio 2008. This was a big help for me since Microsoft is practically forcing new programmers into VS 2008 these days. Since I am a new programmer, VS 2008 is what I have. Here’s a direct link to the particular blog that has those template files. http://modthemachine.typepad.com/my_weblog/2008/10/converting-vba-auto-macros-to-an-add-in.html

    Thanks again for your blogs!!

    =====
    Brian Hall

  2. Hi Brian,
    Glad to know that you are finding my blog helpful to learn Inventor customization and C#. I have also been Brian Ekins blog from sometime now and is definitely a great resource.

    With regard to VisualStudio2008, I was probably lucky to get a VS2005 and presently working on it. The Inventor Addin templates for Inventor 2008 donot work on VS2008.

    Since you are learning C#, I recommend a very good resource, which will make your learning easier and effective. Check out http://code.professor-mustard.org

    Let me know if you have any issues, I will be more than happy to help you out 🙂

    Regards,
    Rajeev Lochan

Leave a Reply

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