Revit API Resources

If you are interested in getting into the Revit API, you're going to need some resources to help you along. Below are the links to the places that have helped me and continue to help me.

First, the free resources:

Autodesk's DevTV introduction to the API:

Snoop Tool - RvtMgdDbg:

AUGI Revit API Discussion Forum:

Autodesk Discussion Groups - Autodesk Revit API

The Building Coder - Jeremy Tammik

CAD Application Development - Matt Mason

Revit Programming - Ed Pitt

Bolt Out of the Red - Guy Robinson

Rod.Net - Rod Howarth
And Rod's Revit API search tool:

Software Development Kit (SDK)
It comes with your Revit media/DVD or if you downloaded Revit and then installed it, look in C:\Autodesk.
The SDK has lots of samples, the Revit API Developer Guide pdf, and the RevitAPI chm (help) file.

These resources aren't free but may be of great value:

Autodesk Developer Network

Your Autodesk Reseller

And finally some personal notes from my experience with the API

Brief Outline of What I Do When Writting Code:

Working with the Revit API is mostly about automating or simplifying something you can already do manually with regular Revit tools. The exception to this may be in the area of analysis tools. So your first steps with any code you make should be to understand the manual steps, menus, dialog boxes, and human interactions involved in your code idea.

Once you have an idea and understand the regular manual process, then use the snoop tool RvtMgdDbg to learn what is exposed in the API. This will help you figure out if what you want to do is possible. Also look at the SDK examples. That may give you some indication of what is possible as well as give you a head start on your code.

Then as you go, use the resources above to help you along and get over rough spots.

Word of Warning
If your code gets ambitious, be careful about ROI. Revit already automates many tedious tasks and is always improving to automate more. So as a rule of thumb, make sure that the payback for the effort you put into making the code and supporting it occurs before the next release of Revit just in case that new release has a viable equivalent to your code.

This warning is especially directed at those like me who are used to complex coding for AutoCAD. AutoCAD is NOT inherently an AEC program and needs ambitious add-ons to make it so. Revit however IS inherently an AEC program and just needs some simpler (analysis tools excepting) helping code to fit it to your company's workflow. So don't get too carried away before doing some risk assesment.

Comments in Your Code
Do yourself and your company a huge favor and put appropriate comments in your source code. If you get hit by a bus (why are buses always getting the bad rap?) and someone else has to continue with your code or you are revisiting or updating your code which you spent a whole year forgetting about, then these comments will come in handy. Mostly my comments start off by outlining the reason why the code was made and the general outline of what it should do. Then throughout I will put in notes about why a certain coding path was chosen or even why certain seemingly obvious coding paths were not chosen. You can look at the code to see what it is doing, but the why is not always obvious but very important.