run by 3 BIM Industry Experts, We have experience from the GC, Sub, and Engineering Side to the Developer side

Getting Started with Revit API

Getting Started with Revit API

There are plenty of ways to share development efforts with others - Dynamo Graphs, Revit Macros, Revit Add-Ins, oh my!

We’ll work with Revit Add-Ins for most of this blog, and our first coding post will start at the beginning - adding buttons : ]

Getting Set Up

1. An IDE (Integrated Development Environment - I’ll use Visual Studio Community) - this is where you’ll write code and build your add-in (Download here)

2. An installation of Revit - this is where we’ll test that our code works (Purchase and download here)

3. A favorite programming language (I’ll be working with C#, most of the Revit API community uses this so we should be consistent).

4. Here are some helpful links:

Once all of those are appropriately set up, we can start coding! …sort of. We’ll need to configure a few things in a specific way:

1. Project(s) are created as Class Libraries, built on .NET Framework

2. Projects are built on the correct version of .NET Framework for your version of Revit (Revit 2019 uses .NET Framework 4.7). In Solution Explorer -> Project -> Properties -> Application

3. Use Managed Compatibility Mode on, Debug tab -> Options -> General

4. Add your references in Solution Explorer -> Project -> References:

  • To interact with things in Revit, you’ll need: RevitAPI & RevitAPIUI

  • To add buttons and other controls, you’ll need: AdWindows & PresentationCore & PresentationFramework & WindowsBase

And now that that’s out of the way, we can get to the fun stuff!

Programming Buttons in Revit

Autodesk University Class Voting!

Autodesk University Class Voting!