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.
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:
- Replaced the RevitAPI.dll and RevitAPIUI.dll references.
- Changed the .NET framework from 4.0 to 4.5.
- Rebuilt all. It compiles successfully, generating 0 errors and 24 warnings.
- 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.
I wasn't aware that in the 2015 version of the Revit SDK we woun't have the RevitLookup.
Thanks for upgrading it Jeremy
Posted by: Andrei Bejenaru | April 07, 2014 at 17:22
Dear Andrei,
Thank you for the appreciation... my pleasure entirely :-)
Cheers, Jeremy.
Posted by: Jeremy Tammik | April 08, 2014 at 02:41
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?
Posted by: Kenneth Vejen | January 13, 2015 at 02:37
Hi again Jeremy.
Nevermind the question, I managed to get it working :)
Posted by: Kenneth Vejen | January 13, 2015 at 02:56
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.
Posted by: Jeremy Tammik | January 13, 2015 at 06:45
Dear Kenneth,
Thank you for the confirmation and congratulations on getting it up and running.
Cheers, Jeremy.
Posted by: Jeremy Tammik | January 13, 2015 at 06:47
Hi Jeremy,
Is there a way to target NET Framework 4.5 in visual C# 2010?
Cheers.
Posted by: Alexandre Sabatier | January 29, 2015 at 10:21
Sorry I've found something..
Posted by: Alexandre Sabatier | January 29, 2015 at 10:39
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
Posted by: [email protected] | April 21, 2015 at 10:13
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.
Posted by: Jeremy Tammik | April 21, 2015 at 10:42
Hi again Jeremy,
Never mind the question, I got it up and working.
Thank you for upgrading it :)
Cheers
Posted by: [email protected] | April 21, 2015 at 10:42
Congratulations!
And: I was faster :-)
Cheers, Jeremy.
Posted by: Jeremy Tammik | April 21, 2015 at 10:44