I’ve had some requests for compiled assemblies of the Autodesk Revit 2011 API SDK samples. They’re useful for those of you who don’t have Visual Studio installed or don’t know how to compile them. Or if you’re wondering what’s supplied in the SDK and just what’s possible with the API. This isn’t as user friendly as it could be due to the number of commands, but here’s a download of all SDK samples . The SDK is an impressive resource now.
Note: These are Autodesk SDK Samples . I haven’t tested them all so if you find something that doesn’t work let me know. The API team had a huge job migrating to the 2011 API so I wouldn’t be surprised if some didn’t work correctly at the moment. If it’s an easy fix I’ll update the download.Because they’re Autodesk samples they’re covered by their licence:
Permission to use, copy, modify, and distribute this software in object code form for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and the limited warranty and restricted rights notice below appear in all supporting documentation.
AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE UNINTERRUPTED OR ERROR FREE.
Use, duplication, or disclosure by the U.S. Government is subject to restrictions set forth in FAR 52.227-19 (Commercial Computer Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical Data and Computer Software), as applicable.
If you’ve installed the samples correctly you should see 5-6 extra tabs (depending on discipline) with all the commands available via the new tabs on the ribbon. MEP and Structure will have an extra tab for commands specific to their disciplines. All other commands should run on any Revit discipline. I have used a generic icon for the button images, hopefully this isn’t too confusing.
Here’s my Revit installation running the SDK samples.
Any files (.rvt,.rfa,.xlsx) relevant to the command are in the files subdirectory. ReadMe files for each command are in the help subdirectory.
To Install Samples
1.. Download the zip (SDKSamples.zip) from here and unpack the zip to the required directory. Remember to unblock the zip if running Win7.
2.. In the package directory there is a Console application called RunMeToInstallAddIns.exe.
There appears to be an issue with this and the RevitAddInUtility.dll versioning. Although it works for me. It doesn’t work for others. I’m still trying to figure out what’s happening and why. I will update ASAP.
Run this to install the SDK addins to the current users directory. Note, you must have administrator rights to run this application. If you don’t , then you will have to update the assembly path of the addin in a text editor. The SDKSamples.addin is the addin for the command that adds the SDK commands as 5-6 ribbon tabs.
The line you need to edit is the assembly line in the addin. For example in the SDKSamples.addin this is :
<Assembly>Redbolts.RevitSDK.AppBuilder.dll</Assembly>
Say you unzip to the C:\SDKSamples\package directory then the above line becomes :
<Assembly>C:\SDKSamples\package\Redbolts.RevitSDK.AppBuilder.dll</Assembly>
Save the addin and exit.
To clarify this. If you have had to edit the addin’s manually you then need to copy the .addin files only to the correct directory. Depending on OS these will be:
XP:
C:\Documents and Settings\<user>\Application Data\Autodesk\Revit\Addins\2011\
Vista/Win7:
C:\Users\<user>\AppData\Roaming\Autodesk\Revit\Addins\2011\
To uninstall just delete the .addins from these directories.
3.. Start Revit and you should see the additional tabs. Note there is no checks currently in place to account for a command requiring the user to be in the family editor. So read the readme’s if you’re unsure as to what the command does. I’ve tried to group the commands logically. But if I’ve got it wrong do let me know ;-)