Here is a succinct overview of some resources available for getting started using the Revit API, compiled by Mikako Harada. The individual items have been mentioned in previous posts, and links to those are included. This document provides a useful and up-to-date overview for the current state, still focused on Revit 2009. You can expect an update of this material later in a couple of month's time, when the training material has been enhanced for Revit 2010.
1. Setting up the Environment
Revit Product – you can download the latest version of the released products from the Autodesk product page > Products > Alphabetically. From each Revit product page, look under Product Download. Here are the current links, but note that the exact locations may change:
Without an activation code, you can only use Revit in view-only mode.
Revit SDK – the Revit SDK is included in every Revit install.
- DVD version: \Utilities\Common\Software Development Kit\Revit 2009 SDK.zip
- Web version:
\Download\Utilities\Common\Software Development Kit\Revit 2009 SDK.zip
RevitAPI.dll is part of every Revit installation and is located in the folder
Development Environment – Microsoft Visual Studio 2005 for Revit 2009, and Visual Studio 2008 + SP1 for Revit 2010. The Express edition can also be used.
Revit API Documentation – The Revit SDK includes a Developer Guide, help file, and many samples. More detailed information on the SDK contents and how to manage, build and load the samples was discussed in some early blog posts:
- Getting Started with the Revit API
- The Revit SDK Contents
- Managing SDK Samples
- The SDK Samples Solution SDKSamples2009.sln
- Loading SDK Samples
- Debugging a Revit Add-In
Yet more information for beginners is included in the Getting Started category.
2. Where to Start
a. Watch the training video - The best way to start will be to watch our webcast material. This includes a recording of the webcast, the Powerpoint presentation, and training labs source code. This material is also available from the Developer Center training schedule page. There is a Revit Architecture and Revit Structure section in the Developer Center which provides other material including a polished version of the recording called DevTV, which is available for download or online viewing. It is slightly out of date, being based on Revit 2008. But you can still get the basic idea. You may want to see which one is suited for you.
b. Try running the HelloRevit sample yourself, go through the Labs code, and then look at some further samples in the SDK. The following samples provide good starting points:
- RevitCommands
- Fire Rating
- Viewers/ElementViewer
- CreateBeamsColumnsBraces
c. A must-have tool is RvtMgdDbg, which we discussed in a separate post.
3. For more information
- Autodesk University: search for 'Revit' in the Developer or Customization tracks.
Here are a few classes held by us at last year’s AU with material providing additional information:
- DE101-3 The Revit SDK Sample Smörgåsbord
- DE111-3 A Closer Look at the Revit Database with the Revit API
- DE205-3 Enhancing Your Revit Add-In
- Autodesk Discussion Groups > Revit Architecture > Revit API.
- Autodesk Developer Network, the ADN web site, accessible to ADN members only, where you can:
- Search DevNotes, which are Q & A pages.
- Submit questions through DevHelp Online.
4. Looking forward to Revit 2010
We will be migrating and updating our training material for the Revit 2010 API in the coming months. The first intermediate result will be the webcast training on April 29th. If you are interested in learning more about what is coming for Revit 2010, please take a look at the recording of the recent Developer Days Online AEC webcast.
hi,
I have built the application in VS 2008 Express edition and Revit 2010.
when I run the application through the code it opens Revit. Now If I try to Open the Project the revit closes and the code stops running.
has any one faced this problem, or I am going wrong any where.
Thanks,
KK
Posted by: Kiran | May 14, 2009 at 02:30
Hi Kiran,
One thing that is easily and often wrong is leaving the 'Copy Local' flag on the reference to RevitAPI.dll set to its default value of True. You need to set it to False to run Revit with your add-in.
Cheers and good luck, Jeremy.
Posted by: Jeremy Tammik | May 18, 2009 at 04:28
Hello Jeremy,
Can you point me to material, blog or forum that discusses how to insert Code Regions from the SDK material into existing code?
I'm learning to code so any basic level information that you can provide me would be a big help.
I figured out how to do the Hello World tutorial located at the beginnning of the Revit 2010 API user Manual, but now I would like to expand on the information by utilizing the additional code regions supplied in the User Manual but I continue to get errors.
I'm sure it's basic in nature but because of my limited experience difficulty is around every corner.
Again, if you could supply me with a simple tutorial showing how to insert a code region into existing code would be very helpful.
Thanks alot,
Vince
Posted by: [email protected] | October 14, 2009 at 03:39
Dear Vince,
Thank you for the question. I just created a new post to respond to it:
http://thebuildingcoder.typepad.com/blog/2009/10/namespaces.html
I hope that answers your question.
Cheers, Jeremy.
Posted by: Jeremy Tammik | October 15, 2009 at 05:58
Hi
I am Dhiraj .I have to acess Wall Type Properties in which i want a value of "Function".The Function value Indicates Wall is "Interior"or "Exterior" etc. Please can you help me?
Thnaks
Dhiraj
Posted by: Dhiraj | April 12, 2010 at 05:15
Dear Dhiraj,
You can access that property via the built-in parameter FUNCTION_PARAM on the wall element.
An exampe of this is given in the method IsExterior in
http://thebuildingcoder.typepad.com/blog/2010/01/south-facing-walls.html
Cheers, Jeremy.
Posted by: Jeremy Tammik | April 14, 2010 at 14:06
Hi..
Actually i'm new in Revit and BIM stuff. I need your advice. I need to develop the Application to link from Revit to Database. I knew that in revit, we can import model to database. But in my case, the requirement is the Application have to do the extraction. Is it possible to do that? What language is better to develop an application and what database can support Revit?
Thank you.
Abidah
Posted by: Abidah | August 26, 2010 at 00:36
Dear Abidah,
Sure it is possible. You can use any language you want. My preference is mostly C#, but you can just as well use VB or managed C++ or any other language supporting the .NET framework:
http://thebuildingcoder.typepad.com/blog/2010/07/visual-studio-2010-and-the-net-framework.html
Same thing for the database, you can connect any database that you like to Revit, as long as it provides an API to drive it programmatically.
You are completely free in all your choices!
This might be of interest:
http://thebuildingcoder.typepad.com/blog/2009/07/integration-with-a-database-or-erp-system.html
Cheers, Jeremy.
Posted by: Jeremy Tammik | August 26, 2010 at 01:14
Hi Jeremy,
I have quite an extensive experience in Revit though I still like and am using Revit 2009.
In our typical projects, we insert quite a lot of generic models or if you like, families for the purpose of scheduling and then we tag them and adjust their position separately. While Revit allows us to use the "tag all" I wonder if we can see the model or family pre-tagged as we are inserting them as the user needs to identify visually what is being placed in the project. Is there a way of achieving this even if it is through an API?
Appreciate your response!
Thanks
Posted by: Ali | October 14, 2011 at 20:34
Dear Ali,
I cannot say much specifically about your problem, but it sounds to me as if one powerful way to achieve what you need could be implemented using the DMU or dynamic model update.
It enables you to register an updater that reacts to specific changes in the model, so that for instance each insertion of a suitable family instance could trigger an updater to automatically tag it appropriately.
Oh no, that is Revit 2012. Sorry. Hmm, nope, for Revit 2009 I have no idea. Good luck!
Cheers, Jeremy.
Posted by: Jeremy Tammik | October 16, 2011 at 08:04
Where can I find activation code from rev it architecture 2009
Posted by: Magdalene imeldah | April 19, 2013 at 08:20