The Revit 2014 Pre-release API and SDK

Below, we look at how ADN members can obtain the Revit 2014 pre-release SDK, address migration issues, and one or two interesting new aspects of the API.

First however, a few words on yesterdays post touting the idea of a cloud-based restaurant seating arrangement and cleaning application. As you probably noticed, the main new ideas I discussed there were in honour of April fool's Day.

Many of my colleagues joined in with other similar hoax blog posts. Stephen Preston presents an April fool's Day blog post overview listing them all.

Scalable water box

I hope you enjoy them. They might even provide you with a useful real-world idea or two :-)

As always, think outside the box!

Back to more serious business, the Revit API, and the Revit 2014 pre-release.

The Revit 2014 Pre-release SDK

As you can guess, ADN member have already been working with Revit 2014 and its API to get their products ready for the new release.

Here are a couple of questions and interesting observations that came up and are still coming in:

Where is the Revit 2014 SDK?

Question: Is there an SDK available for Revit MEP 2014?

The Revit Developer Center still only lists the 2013 SDK...

Answer: ADN members can obtain the Revit 2014 SDK from the ADN web site. It is included in the preview version of Revit:

The installer extracts its content to a temporary installation folder, which by default is located in C:\Autodesk.

Within this folder, you can navigate to the Utilities\SDK subfolder, which contains the installer:

This executable extracts and installs the Revit SDK, which is identical for all flavours of Revit including MEP.

Please note that this is a pre-release version of the SDK. There definitely will be changes and additions made before the final release, so plan on updating it as soon as we get there. As always, the final version will obviously be posted to the Revit Developer Center as soon as possible.

Do we need to rewrite our apps?

Question: Sorry if my question is stupid, I am not a programmer and it is hard for me by myself to get to the problem details.

Our programmer reports that our apps do not function under the Revit 2014. I understand it happens because many methods were replaced with new calls. Does it mean that we should rewrite our apps and replace old methods with new ones? Is there a way to upgrade apps automatically?

Answer: Thanks for posting this question. Revit does not provide any tools to automatically upgrade lower version code to higher version. However, Revit does provide plenty of information on how to upgrade the code yourself. Here is the procedure:

That is easy to follow. Actually, the migration of an add-in from Revit 2013 to 2014 is much easier and faster than in the past few releases.

For more information, please look at the numerous examples in The Building Coder migration category.

Good luck!

Add to an Existing Command

Question: I read your post about disabling commands through the API and it’s sort of along the lines of what I’m trying to do. I’m looking to capture a specific CommandId ID_SETTINGS_REVISIONS, run it, and, when the command finishes, run a custom add-in. I don’t want to replace the command, just add some custom background content at the end of it.

Is that possible?

Answer: In 2013, all you can do is replace the existing command completely with your own implementation.

In 2014, you can also launch an existing Revit command.

Combining these two functionalities should enable what you wish.

Full Circle Creation

The Revit 2014 API enables the creation of a real full circle. That was is not possible in Revit 2013. There, we had to resort to creating two separate 180-degree arcs.

That was just a starter. Lots more to come!