Migrating The Building Coder Samples to Revit 2016

I finally tackled the task of migrating The Building Coder Samples to Revit 2016.

I also have another update on RevitLookup to report:

Preparation

Before doing anything else, I ensured that the entire project compiles for Revit 2015 with zero warnings.

This guarantees that I am not using any API functionality that was already deprecated in Revit 2015 and therefore removed in 2016.

I then replaced the Revit 2015 API references by the Revit 2016 ones:

Revit 2016 API references

After that, compilation produced 6 errors and 30 warnings.

Fixing the Compilation Errors

The six errors all have the error number CS0246 and are caused by two simple issues:

The first of these is due to a typo fixed in the Revit 2016 API, a missing 'i' in the spelling of the class name, which is now named ExternalDefinitionCreationOptions, as originally intended.

The second missing class is renamed to WallFoundation in Revit 2016, cf. Structural API changes > ContFooting and ContFootingType class and members renamed.

These errors are fixed by renaming ExternalDefinitonCreationOptions to ExternalDefinitionCreationOptions and ContFooting to WallFoundation. The errors are eliminates and 30 warnings remain.

We completed the first successful compilation of The Building Coder samples for Revit 2016!

I published that right away as release 2016.0.120.0.

Installing RvtSamples

Before starting to fix the warnings, I thought it might be nice to give it a test run.

To do so, I would like to use the RvtSamples external application add-in to load it.

That is included in the Revit SDK samples and can be compiled together with all the other SDK samples using the Visual Studio solution SDKSamples.sln:

Revit 2016 SDK samples solution

I downloaded the Revit SDK installer dated April 23 from the Revit Developer Centre and was able to compile with no problems.

The next step is to set up RvtSamples to load all the SDK samples into Revit.

I edited RvtSamples.txt, replaced the default SDK samples path C:\Revit 2016 SDK\Samples\ by my specific location, and toggled the Release binary directories to Debug.

Some paths are still erroneous, e.g.

On my system, it needs to be changed to

With that, RvtSamples loaded successfully and provides access to launch most of the other SDK external command samples:

RvtSamples in Revit 2016

I added the include directive that I implemented back in 2008 to pull in the BcSamples.txt file to load The Building Coder Samples to the end of RvtSamples.txt:

#include C:\a\lib\revit\2016\bc\BcSamples.txt

Lo and behold, now The Building Coder samples are accessible from the RvtSamples collection as well:

The Building Coder Samples in Revit 2016

Happy, happy.

I'll return and fix those pesky warnings some other day.

RevitLookup Update Displays All Built-In Parameter Names

Maxence Delannoy @mdelanno submitted a new pull request #9 on RevitLookup to list all the display names associated with a given built-in parameter:

RevitLookup displays all built-in parameter names

The new version is tagged as RevitLookup release 2016.0.0.9.

Thank you very much, Maxence!