This extension for Visual Studio provides a multi-project template for creating a Revit Addin for any Revit version with most boiler-plate code ready. It uses Visual Studio's "Shared Project" to share common code to all Revit versions. After creting a new project based on this...
This extension for Visual Studio provides a template for creating a Revit Addin for any Revit version with most boiler-plate code ready.
After creting a new project based on this template, compiling and debugging will immediatelly be possible. This should gives novices an easy and clean "Hello World" application that can scale as they learn.
Experienced Revit Addin creators can also be up and running with their ideas very quickly.
Features
The solution generated by the template in this extension consists of one project for each Revit version from 2018 forward.
Each project references a single "Resources" project for files, images, and icons they have in common.
The Compilation Symbol for each project is set to Revit2018, Revit2019, etc.
RevitAPI.dll, RevitAPIUI.dll, and AdWindows.dll are all included and referenced in the template using the latest version for each Revit year in the corresponding project.
Each project will have its own Revit manifest file (.addin), and that file is set to Copy Always to the output directory. A new GUID is automatically generated for the AddinId.
Post-build events are generated to copy any .dll and .addin files from the output directory of each project to the respective installed Revit addin folder.
Planned Improvements
[ ] Implement a form in the wizard to collect user preferences when creating a new project.
[ ] Get user input to create the manifest file (.addin) and edit the assembly (AssemblyInfo.cs) of each project.
[ ] Based on user input, create either a new "Application" addin or a "Command" addin.
[ ] Detect when a debugging session begins/ends and clear/restore the addins that Revit loads. The goal is to run addins that are in active development only when debugging, and to reduce the chances of unrelated addins interacting with the addin being developed.