Lesson 8: Learning More

This final lesson is intended to provide you with additional information to increase your productivity when creating Autodesk Revit plug-ins. You will look at information on API-related help, documentation, samples and – most importantly – where to go next to continue your learning around the Autodesk Revit API.

Let’s first look at the API resources that can be installed along with the Autodesk Revit product onto your computer:

Autodesk Revit Software Development Kit (SDK)The Revit SDK contains a great deal of useful information regarding the Revit API. The three main categories of content are: documentation, samples and tools.

Video: Installing Autodesk Revit SDK

Video: Exploring the Autodesk Revit SDK

Documentation

The SDK contains two Microsoft Word documents, one on getting started using the Revit API and another which lists the changes to the Revit API when compared with the last version. It also contains an Adobe PDF document called the Revit API Developer Guide, which serves as an introduction to various API concepts on a chapter-by-chapter basis. A complementary file, which is extremely important to anyone working with the Revit API, is the Revit API Help Documentation, found in RevitAPI.CHM file. You can search this file for a particular class, method or property, read their descriptions and take a look at associated sample code (if any is provided).

Samples

The SDK contains a comprehensive list of API samples which cover almost all the major Revit API topics. One useful tip is to open the main "Samples" solution file in Visual C# Express and search for the API method you wish to work with: if it exists in the samples, you can very quickly see how the API is used and – if it makes sense – re-use the code in your plug-in. The SDK also contains Visual Studio for Applications (VSTA) samples that show you how to take advantage of VSTA to put together quick prototypes to test particular Revit API functionality. Revit 2013 replaces VSTA with SharpDevelop and these SharpDevelop samples can be located in a folder named ‘Macro Samples’ in the Revit 2013 SDK.

Tools

Autodesk Revit LookUp is a tool that helps analyze the currently running instance of Revit, the documents loaded in it and the elements (including content) contained in the project. In other words, it’s a great tool for taking the lid off the Revit database and understanding what’s going on. The tool comes with complete source code which can also be used to understand how to access and analyze model information programmatically. It’s most commonly used as a standalone tool for inspecting the Revit model, though: you certainly don’t need the source code for it to be useful.

Add-In Manager is a tool that helps add external commands and applications to Revit without having to manually edit manifest files (as you did in lesson 1). The tool has its own dialog that allows you to browse to the folder containing the plug-in DLL, to specify the command name and to provide a plug-in description. Using this information, you can load commands directly into Revit or save the plug-in information to the manifest file for future loading. This also helps avoid typing errors when working with manifest files that can lead to unexpected results when attempting to load a plug-in.

Resources Online

Autodesk Revit Developer CenterThe Autodesk Revit Developer Center is a great resource for those working with the Autodesk Revit API. As well as listing recent API additions and improvements, it aggregates the various other resources available to you. Highlights of this webpage include:

The latest available download for Revit SDK

DevTVs, self-paced video tutorials which show you how to create your own plug-ins using the Revit API. These can be viewed online or downloaded for later viewing at your convenience.

Webcast recordings for the Revit API. They cover the APIs of Autodesk Revit Architecture, Autodesk Revit Structure, Autodesk Revit MEP as well as the Autodesk Revit Family API. These courses introduce basic Revit programming concepts and are a great way to learn more about using the Revit API: view the list.

The Building Coder Blog The Building Coder is a popular blog containing information related to the Revit API, including white papers, discussions on the use of various APIs and the answers to many commonly-asked API questions.

ADN AEC DevBlog ADN AEC DevBlog is a new resource for software developers working with Revit, Navisworks and other AEC and BIM technologies from Autodesk.

Other Online Resources

Autodesk Revit product downloads, these can be installed and used without activation for 30 days from the day of installation

Autodesk Developer Network (ADN) members can use this online resource to access additional technical content, to submit specific questions related to the APIs to Autodesk products, and to access released and beta software for development purposes. If you are serious about creating plug-ins with the Revit API – even if for internal use within your company – and are interested in finding out more about what ADN can offer, please visit: http://www.autodesk.com/joinadn

This brings you to the end of this guide. We hope this has proven to be a helpful beginning to your journey with the Revit API. We wish you all the very best in your future API endeavors.