Templates - Nice3point/RevitTemplates GitHub Wiki

All templates are fully supported by .Net, and you can use them in your favourite IDE, such as Visual Studio, JetBrains Rider or CLI.

These templates supports Revit 2021-2026 versions out of the box and can be extended without any limitations.

More information about dotnet templates: https://github.com/dotnet/templating/wiki

Templates:

If you are not sure what options to choose when creating a project, keep everything by default, templates uses optimal and frequently used settings. Or explore the samples before you start.

Revit AddIn

Suitable for single project add-ins. Perfect choice for small projects.

Just create a project, and it will already be ready to run in Revit.

  • The template already contains startup configurations, and you can run debugging for any Revit version without any setup.
  • Support for multiple Revit versions and different .Net versions is available by default.
  • The template provides the ability to create add-ins with or without a user interface, and more experienced developers can enable dependency injection and logging.
  • Choose whatever features you want, it's all optional.

image

Revit AddIn Application

Suitable for modular add-ins. Option for developers who want to create a distributed scalable application.

This template creates a main empty application containing only the entry point file and .addin manifest.

Optionally, you can enable dependency injection support, where this application becomes a dependency provider for other modules.

Note

Project based on this template should be used to combine all modules and connect them to the Revit ribbon, and it should not contain business logic if you plan to create a modular application.

image

Revit AddIn Module

Suitable for modular add-ins. Option for developers who want to create a distributed scalable application.

This template creates an empty module with or without user interface, containing files and dependencies necessary to implement the business logic.

The Inject dependecies option instead of creating an IExternalCommand will create a class that receives all dependencies from the Revit AddIn Application. Suitable for IoC use cases.

After creating a project based on this template, you have to add a reference to this project from Revit AddIn Application

Tip

Creating a project without UI based on this template will create a completely empty project, great for writing util libraries for your add-in.

image

Revit AddIn Solution

Solution template. Suitable for enterprise development and developers who need a ready-made project structure with all core files, build system and installer.

This template contains:

  • Nuke build system
  • Installer project, that generates an .msi package
  • Auxiliary files such as .gitignore, Changelog.mb which are usually created in each solution. Readme.md contains documentation and instructions for building the project.
  • CI\CD setup
  • JetBrains Rider Run configurations

Important

When creating a solution, be sure to check the box Put solution and project in the same directory.

Tip

The solution template should be used before the project templates (if you need it). And you have to create all plugins in produced solution, in the source folder.

Nuke

Nuke is used to build a project for various configurations. In this case, for all specified Revit versions. It also allows you to automate other secondary processes, create an installer, post news on Twitter after build, order pizza, etc.

More details about Nuke here.

Note

You don't need to use Nuke to debug the project, it is only necessary for the release.

Installer

WixSharp was chosen as the installer, it is, like Nuke, based on a console application, this helps to make the creation of the installer automated and connect it to Nuke.

More details about WixSharp here.

image

⚠️ **GitHub.com Fallback** ⚠️