More than often, I receive inquiries about how to get started with Revit API. Attached here is the document that I have been keeping and updating since Revit 2009: Download Getting Started with Revit 2013 API This gets quite handy when I get an inquiry. I'm also copy and pasting the contents here so that from now on, I can point to our blog, too:
1. Setting up the Environment
- Revit Product – you can download the latest version of released products from Autodesk product page. Go to http://www.autodesk.com, look under “Products” menu, “Alphabetically.” From each Revit product page, look under Product Download. Following are the examples of the links as of the time when this documentation was written. (Note: exact link may change):
Revit (OneBox available with Design Suites):
http://usa.autodesk.com/revit/trial/
Revit Architecture:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=9262388
Revit Structure:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=9339705
Revit MEP:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=9262907
Without an activation code, you can use Revit as viewing-only mode.
- Revit SDK – you can find Revit SDK in every Revit install.
The SDK install is located under “Install Tools and Utilities” menu on the main page of Revit installer. (Note: there is another menu called “Utilities” you see right after the product installation, which contains only the link Content Batch utilities. Click on “Back to First Page” button to move back to the main page of the installer to install SDK.)
Alternatively, you can also find the SDK in the extraction folder, under:
<extraction folder>\support\SDK\RevitSDK.exe
If you have accepted the default location, which typically looks like:
C:\Program Files\Autodesk\Revit XXX 201x\support\SDK\RevitSDK.exe
Note: SDK may be updated. Make sure you check the latest at either ADN site (member only) or public Autodesk Developer Network site for Revit (available to public):
http://www.autodesk.com/developrevit
RevitAPI.dll and RevitAPIUI.dll is in every Revit installation under <Revit install>\Program\
- Development Environment – Microsoft Visual Studio (MSVS) 2010 for Revit 2013. (In previous releases, 2011 and 2010, you may also use VS 2008 + SP1, but debugging is limited. All the samples are on VS 2010).
- Revit Documentations – Documentation about Revit and Revit API are all on the Autodesk Wiki now. Revit SDK includes Developer Guide and many samples.
2. Where to Start
(1) Watch the training video - The best way to start will be to watch the recoding of our webcast.
There is recordings called DevTV, which is posted on the public ADN site for Revit: http://www.autodesk.com/developrevit
(Scroll down toward the bottom.)
If you are new to the programming as well, take a look at “My First Revit Plug-in” training materials:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=16777469
You can also download previous year’s webcast recording from here:
http://download.autodesk.com/media/adn/RevitAPI_20May2010.zip
This covers the basic of Revit API since 2011. (Note: Revit API had a major renovation in 2011). The materials from this webcast include recordings, ppt and training labs code. (You can find the same from ADN site, under Revit knowledgebase section, or public ADN site Training schedule page.)
This year’s webcasts cover major enhancements:
http://download.autodesk.com/media/adn/DevDaysOnline-Revit2013API.zip
http://download.autodesk.com/media/adn/Revit2013APIWebcast_May17_2012.zip
If you are interested in Family API, there is a webcast recording about Family API, too. You can find it from the location below:
http://download.autodesk.com/media/adn/Revit_2010_Family_API_Webcast-July2009.zip
(2) Try the latest training labs, which is available from the public ADN site:
http://www.autodesk.com/developrevit
(Scroll down toward the bottom, under "Learning" >> "Samples and Documentation").
(3) Try HelloRevit sample by yourself, go through Labs code, and look at some for samples in the SDK.
The following samples will be a good starting point:
• RevitCommands
• Fire Rating
• Viewers/ElementViewer
• CreateBeamsColumnsBraces
3. For mode information
• The Building Coder, Jeremy Tammik's Revit® API blog:
http://blogs.autodesk.com/thebuildingcoder.
If you read through from his earlier posts, you can get the basic idea about how to get started.
• AEC DevCamp 2012
http://download.autodesk.com/media/adn/Autodesk_AEC_DevCamp_2012.zip
AEC DevCamp is a bi-annual event. This link includes the comprehensive set of materials and includes ones for both beginners and advanced for up to 2013 API. Look under for Revit Track 1 (Beginner) and Track 2 (Advanced). (i.e., folders starting with 1.x or 2.x)
• AU 2009/2010/2011
http://au.autodesk.com >> go to “Online Classes” tab. Search “Revit API” and/or under Developer or Customization and Programming Track. (You should be able to sign up and have access to those materials.)
For example, here are a few classes from AU2010 and AU2011 presented by Revit API engineers and Developer Technical Services team. Those materials give you additional, more in-depth information:
AU2011
• CP4011 Geometric Progression: Further Analysis of Geometry Using the Autodesk® Revit® 2012 API, by Scott Conover
http://au.autodesk.com/?nd=class&session_id=9124
• CP5381 Asynchronous Interactions and Managing Modeless UI with the Autodesk® Revit® API, by Arnost Lobel
http://au.autodesk.com/?nd=class&session_id=9879
• CP5211 Autodesk® Revit® Construction Modeling and API for Builders, by Harry Mattison
http://au.autodesk.com/?nd=class&session_id=9528
• CP4451 Extensible Storage in the Autodesk® Revit® 2012 API, Jeremy Tammik
http://au.autodesk.com/?nd=class&session_id=9263
• CP6760-L Autodesk® Revit® 2012 API Extensible Storage, by Jeremy Tammik (Labs version)
http://au.autodesk.com/?nd=class&session_id=9726
• CP4453 Everything in Place with Autodesk® Revit® MEP Programming, by Jeremy Tammik
http://au.autodesk.com/?nd=class&session_id=9267
AU2010
• CP327-1 Using Dynamic Model Update in the Revit API, by Scott Conover
http://au.autodesk.com/?nd=class&session_id=6843
• CP234-2 Revit 2011 Programing Optimization, by Jeremy Tammik
http://au.autodesk.com/?nd=class&session_id=7246
• CP228-2 Optimal Use of Revit 2011 Programming Features, by Jeremy Tammik
http://au.autodesk.com/?nd=class&session_id=6943
• CP316-1 Presenting Analysis Data in Revit 2011, by Harry Mattison
http://au.autodesk.com/?nd=class&session_id=6905
There are much more. Please search the AU site.
• Discussion Groups
http://forums.autodesk.com/t5/Autodesk-Revit-API/bd-p/160
• ADN site
AEC DevBlog – New blog site by Developer Technical Services team. Covers AEC related products. Open to public.
ADN member only Web site: http://adn.autodesk.com
- Search DevNotes (Q&A pages)
- Submit questions through DevHelp Online
If you are currently not an ADN member and interested in joining, here is a link about ADN membership:
http://www.autodesk.com/joinadn