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.
P1000504_water_box

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.

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:

  • C:\Autodesk
  •  \Autodesk_Revit_Architecture_2014_English_Win_32-64bit_dlm
  •  \Utilities
  •  \SDK
  •  > 03/09/2013 12:27 AM 201,066,482 RevitSDK.exe

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:

  • Open the lower version code in Visual Studio.
  • Add the Revit 2014 API references.
  • In the output window, each error includes a detailed instruction on how to change the code to the higher version.
  • Follow these steps one by one.
  • Compile the project.

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!


Comments

8 responses to “The Revit 2014 Pre-release API and SDK”

  1. Hi Jeremy,
    Is it possible in Revit to extend the curtain wall patterns or maybe introduce new patterns via the API?
    regards,
    Rey

  2. Dear Rey,
    If it is possible in the user interface, then the Revit API may support it as well.
    So please explore the UI aspect first, asking an application engineer, product usage expert, or product support.
    Cheers, Jeremy.

  3. Dear Jeremy,
    Thank you for your prompt reply.
    I am an advance user of Revit Architecture and I find the surface pattern under the conceptual massing limited to only whats in the default pattern properties.
    I’ve always wanted to introduce my own pattern ( and I guess this is the dream of all Architects/Designers), so I would like to know if there is a way I can do that using the API.
    And while I can say I am proficient in Revit, I am a beginner C# developer, so if you could point me to the right resources, I would greatly appreciate it as I am willing to explore all the possibilities just so I can extend the surface pattern in the conceptual massing model.
    regards, Rey

  4. Dear Rey,
    Thank you for your appreciation and background info.
    Is it possible to extend the curtain wall patterns or maybe introduce new patterns via the API?
    Like with all good questions, the answer is yes and no.
    Via the API, you cannot create curtain panel patterns outside of what exist in the UI.
    However, there are at least three options for users who want to extent the curtain panel by pattern functionality:
    1. Rethink how you are using the existing patterns. Look at these posts for what I mean:
    http://buildz.blogspot.com/2009/08/making-custom-patterns.html
    http://buildz.blogspot.com/2010/06/beehives-are-back-real-equilateral.html
    2. Use the Repeat/Divide functionality to create new patterns:
    http://buildz.blogspot.com/2012/12/pattern-deformation.html
    http://buildz.blogspot.com/2013/01/origami-and-context-aware-panel-being.html
    3. Make patterns entirely through the API:
    Curtain panels can be placed directly through the API, and application creators can define their own patterns to connect the dots. Nathan Miller has some examples of this here:
    http://wiki.theprovingground.org/revit-api-py-adaptive
    I hope that helps. Good luck!
    Cheers, Jeremy.

  5. Dear Jeremy,
    Thank you for these gem resources! these should keep me occupied for awhile ;-)
    But hopefully in the future, Revit will have some functionality that user can load acad patterns or something like that and revit will recognize it as a valid pattern.
    more power Jeremy!
    regards,
    -Rey

  6. Dear Jeremy,
    Thank you very much for your help.
    One very important question though… Does joining ADN benefits me as a beginner Developer?
    I mean, does the ADN membership offers a beginner to advance tutorials that is not normally available to the public?
    regards,
    Rey

  7. Dear Rey,
    All the beginners material is available publicly. Some advantages of an ADN membership are: access to almost all released Autoesk software, pre-release software, confidential information, conferences, training and preferred support treatment.
    Cheers, Jeremy.

Leave a Reply to Jeremy TammikCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading