RevitLookup for Revit 2015

My first post dealing with Revit 2015 is dedicated to RevitLookup, the most important Revit database exploration tool, both for developers and interested non-developers.

This is particularly urgent, since RevitLookup no longer is included in the standard Revit SDK (software development kit).

It is now available from the
RevitLookup GitHub repository instead.

I created a preliminary version of RevitLookup for the Revit 2015 Meridian pre-release, just to ensure that everybody who needs access to this tool has it available right away.

RevitLookup in Revit 2015

It compiles and runs perfectly fine, although some compilation warnings on use of deprecated API functionality are displayed.

It currently refers to the Revit API assemblies located in the Revit Meridian root installation folder.
That path needs to be updated to compile for an official release of Revit 2015.

Migration

Here are the steps I performed for the migration, which was extremely straightforward:

  1. Replaced the RevitAPI.dll and RevitAPIUI.dll references.
  2. Changed the .NET framework from 4.0 to 4.5.
  3. Rebuilt all. It compiles successfully, generating
    0 errors and 24 warnings.
  4. Fixed a few of the deprecated API usage occurrences:
  • Rewrote FamilyUtil.GetFamilySymbol using GetFamilySymbolIds instead of Symbols.
  • Ditto in TypeSelectorForm.GetAvailableSymbols.
  • Ditto in Importer.UpdateFamilySymbol.
  • Rewrote TestElements.ViewToNewSheetHardwired to use ViewSheet.GetAllPlacedViews instead of ViewSheet.Views.
  • Updated the version number to 2015.0.0.0.
  • The fixes are currently marked with a comment:

    
    // jeremy migrated from Revit 2014 to 2015:
    

    That will probably be removed again soon, since the same information can be easily gleaned from the version control system.

    Download

    For the complete source code, Visual Studio solution and add-in manifest, please refer to the
    RevitLookup GitHub repository.

    The version discussed above is stored there as
    release 2015.0.0.0.

    It compiles successfully, currently still generating
    0 errors and 19 warnings.


    Comments

    12 responses to “RevitLookup for Revit 2015”

    1. I wasn’t aware that in the 2015 version of the Revit SDK we woun’t have the RevitLookup.
      Thanks for upgrading it Jeremy

    2. Dear Andrei,
      Thank you for the appreciation… my pleasure entirely :-)
      Cheers, Jeremy.

    3. Kenneth Vejen Avatar
      Kenneth Vejen

      Hello Jeremy.
      Why is it that RevitLookup is not longer included, now that a lot of developers use it?
      The actual question:
      I have tried to implement RevitLookup but without any success. I followed Troy Gates link:
      http://revitcoaster.blogspot.dk/2014/06/revit-lookup-2015-addin.html
      and has given me the following error when launching Revit 2015:
      Revit cannot run the external application “RevitLookup”
      System.IO.FileLoadExecption
      Could not load file or assembly
      ……\RevitLookup.dll or one of its dependencies. Operation is not supported. (Exeption from HRESULT: 0x80131515)
      I have also tried implementing your repository along with the files from Troy and still without any success. Can you give my any advice on how to fix this?

    4. Kenneth Vejen Avatar
      Kenneth Vejen

      Hi again Jeremy.
      Nevermind the question, I managed to get it working :)

    5. Dear Kenneth,
      RevitLookup is no longer included in the Revit SDK for the simple reason to make it easier for all users of it to add their improvements to it.
      It is now hosted on GitHub, at
      https://github.com/jeremytammik/RevitLookup
      The current release is 2015.0.0.4:
      https://github.com/jeremytammik/RevitLookup/releases/tag/2015.0.0.4
      By coincidence, a new enhancement was added just today.
      This enhancement is not included in the latest release.
      To get the latest and greatest, simply clone the master branch.
      I hope this clarifies.
      Cheers, Jeremy.

    6. Dear Kenneth,
      Thank you for the confirmation and congratulations on getting it up and running.
      Cheers, Jeremy.

    7. Alexandre Sabatier Avatar
      Alexandre Sabatier

      Hi Jeremy,
      Is there a way to target NET Framework 4.5 in visual C# 2010?
      Cheers.

    8. Alexandre Sabatier Avatar
      Alexandre Sabatier

      Sorry I’ve found something..

    9. Hi Jeremy,
      I followed your instructions on how to migrate Revit Lookup to 2015, and I get around 80 errors. Some of the classes that were not recognized are “WallFoundation”, “ParameterElement”, “SharedParameterElement”,etc. I replaced the RevitAPI.dll and RevitAPIUI.dll references and I changed the .NET framework to 4.5. Can you please help me out with this.
      Thanks in advance,
      Peace

    10. Dear Naji,
      I just updated RevitLookup to compile with Revit 2016.
      To grab a version for Revit 2015, do not clone from the latest master.
      Go to the list of releases instead, and grab the latest Revit 2015 version:
      https://github.com/jeremytammik/RevitLookup/releases/tag/2015.0.0.8
      Cheers, Jeremy.

    11. Hi again Jeremy,
      Never mind the question, I got it up and working.
      Thank you for upgrading it :)
      Cheers

    12. Congratulations!
      And: I was faster :-)
      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