With Revit 2014, there is a new application available at the Autodesk Exchange Store: Structural Analysis and Code Checking Toolkit 2014. This new tools is available for free.
Once you download and install it, a couple new panels will appear under Analyze tab, as shown below, but it will not run due missing codes registered on the machine.
The Code Check tool requires a code to check the model, but this code needs to be developed using .NET languages. Once developed, the codes can be downloaded and installed like any other Revit plugin using the Autodesk Exchange Store, see how to submit here.
Inside the Revit SDK, the folder Structural Analysis SDK should contain all the supporting material. The very first file to look at is the Getting Started PDF at \Revit 2014 SDK\Structural Analysis SDK\Documentation\Getting Started for Code Checking Framework SDK.pdf, which is a guide for new developers.
The SDK also contains the C# project templates, that work with Visual Studio. To install the templates, first close Visual Studio, then copy the following files:
- The VSCodeChecking Addin files are required to proper configure the project, so copy the files from folder \Revit 2014 SDK\Structural Analysis SDK\VisualStudio\Addins\ to My Documents\Visual Studio 2010\Addins\
- Copy all 3 .zip files from \Revit 2014 SDK\Structural Analysis SDK\VisualStudio\Templates\ProjectTemplates\Visual C#\Autodesk\Code Checking\ to My Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\ folder. Do not unzip them.
- Copy the Schema.zip file from \Revit 2014 SDK\Structural Analysis SDK\VisualStudio\Templates\ItemTemplates\Visual C#\Autodesk\Code Checking\ to the folder My Documents\Visual Studio 2010\Templates\ItemTemplates\Visual C#\. Again, do not unzip the files.
Finally start Visual Studio, create a new project (menu File >> New >> Project) and the new options should appear under C# language. The templates are not available in VB.NET.
The next steps are required to configure the project, follow the instructions from the wizard. The VSCodeChecking addin will update de DLL References path, so just wait a few moments. For your information, the required references are installed with the Code Checking plug-in mentioned earlier, which is installed by default at C:\ProgramData\Autodesk\ApplicationPlugins\Structural Toolkit for Revit 2014.bundle, but don’t worry, the references paths will be updated automatically by the VSCodeChecking addin.
For a initial test, just Build the solution. The .addin files will be copied to C:\Users\<YourUserName>\AppData\Roaming\Autodesk\Revit\Addins\2014\ folder. Finally start Revit or Revit Structure. Once you click on ‘Code Settings’ button, it will open and show the newly created code ‘CodeChecking1’ (which is the VS project name).
Of course this is just to demonstrate the overall structure of the project. There are more complete samples at \Revit 2014 SDK\Structural Analysis SDK\Examples folder. The StructuralAssemblyResolver.exe tool will help you update the references path so the samples open properly on Visual Studio. Just run the tool, select the folder where the sample folder and done.
Once the sample projects are built, adjust the .addin files for each sample and copy to Revit Addins folder. The Code Checking toolkit will recognize and load them. Below is the Concrete sample loaded from \Revit 2014 SDK\Structural Analysis SDK\Examples\Concrete\CodeCheckingConcreteExample sample after the respective .addin files were copied to Revit Addins folder.
The complete documentation is available at the folder \Revit 2014 SDK\Structural Analysis SDK\Documentation\, including the Getting Started PDFs and the Reference Guide CHM, which contains a full list of classes.
Hope you enjoyed this first look at the Code Checking SDK.