After a new version of Revit comes out, we all take some time to catch up. Revit API developers often have to get up and running really quickly so they can upgrade their apps for Revit 2019 compatibility. The first few things you will need are: the Revit 2019 SDK and help file, RevitLookup installed, and an understanding of What’s New in the Revit 2019 API.
To install RevitLookup for Revit 2019, head over to this page and grab the latest version, currently 2019.0.0.1. Put RevitLookup.addin and RevitLookup.dll into one of your Revit Addins folders, like:
To install the Revit SDK, follow these steps:
Install Revit 2019 (or access the install media)
Look in the installation folder
In the Utilities subfolder, you will find the Revit 2019 SDK installer – RevitSDK.exe
This will basically unzip a whole heap of Revit API samples and goodness into a folder of your choosing. The key thing I look for initially is the RevitAPI.chm help file. I put this somewhere I can get to it easily (like OneDrive).
Until http://www.revitapidocs.com/ is updated for Revit 2019, the help files is the best way to access information about the Revit 2019 API.
Useful links, mostly from Jeremy over at The Builder Coder:
Right click on BipChecker in Solution Explorer and open Properties
Go to Reference Paths and add your Revit program directory
It should instantly be visible in Revit 2015, Addins, External Tools – even if you have Revit open. While it has many uses, immediately obvious are the fact that it shows whether a parameter is read-write and it also displays GUIDs for Shared Parameters. You can choose whether to display Instance or Type Parameters. Cool.
Put the addin and dll here “C:ProgramDataAutodeskRevitAddins2014”
Put the XLSX here “C:RevitAPIMaterialList.xlsx”
Open Revit 2014
Open the sample Revit file from the zip you downloaded in Step 1
Go to External Tools – AddMaterials
You should see something like this:
A couple of things to keep in mind:
the addin will copy an existing material from the CSI column as the ‘base’ material, and then modify the other values accordingly. Therefore, there must be a source material in place.
Similarly, the Revit project file will need Surface and Cut patterns with the appropriate matching names already in the file prior to running the addin. The addin won’t import new Cut / Fill patterns into the project for you.
There are quite a few interesting ways to animate a Revit model these days. You can use Image-O-Matic, things like Level Displacer, and there is also an interesting SDK sample for animating structural elements.
From The Building Coder: One of the very visually impressive Revit 2014 API samples is the DisplacementElementAnimation application. It automatically animates groups of structural building members in any Revit BIM, proceeding sequentially from bottom level to top. It creates and executes an animation of the model by disassembling and then reassembling it from the ground up. The members are sorted into groups based on category and level and displaced from their actual position. Each group is then animated using the Idling event until the model is reassembled. It is an external application, so it is not automatically made available by installing RvtSamples, which just provides access to the external command SDK samples.
To get this running, you will need to install the 2014 SDK, open the applicable CS project, add the Reference Paths, Build it, add the dll and create the necessary .addin file. However, if you want this type of animation – it will probably be worth it!
Along similar lines, you may be interested in the 2014 DevDays resources: … here are the complete materials from the Revit 2014 DevDays presentations:
Jeremy shows how you can review a DWG file to determine if the source entities were Text or Labels in Revit. This principle extends further, as he describes:
The differing TypedValue 11 is consistently -2000300 for a text and -2000280 for a label element. What does this mean? Well, is actually quite easy. On seeing these large negative numbers in this specific range, an experienced Revit developer will quickly suspect built-in category or parameter enumeration values. You can check what they actually represent in the Visual Studio debugger, by jumping to the definition of these enumerations and searching for the specific values. Looking back at an ancient blog post on the DWG and DXF export Xdata specification confirms that these numbers do indeed represent the built-in category of the source element and thus can be used to distinguish the two.