Scotec.Revit 2027.4.0-dev.4

This is a prerelease version of Scotec.Revit.
dotnet add package Scotec.Revit --version 2027.4.0-dev.4
                    
NuGet\Install-Package Scotec.Revit -Version 2027.4.0-dev.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Scotec.Revit" Version="2027.4.0-dev.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scotec.Revit" Version="2027.4.0-dev.4" />
                    
Directory.Packages.props
<PackageReference Include="Scotec.Revit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Scotec.Revit --version 2027.4.0-dev.4
                    
#r "nuget: Scotec.Revit, 2027.4.0-dev.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Scotec.Revit@2027.4.0-dev.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Scotec.Revit&version=2027.4.0-dev.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Scotec.Revit&version=2027.4.0-dev.4&prerelease
                    
Install as a Cake Tool

Scotec.Revit

Core library for building robust, testable, and maintainable Autodesk Revit add-ins with .NET.

Overview

Scotec.Revit provides the foundational abstractions and infrastructure for Revit add-in development. It simplifies command execution, application lifecycle management, and background-to-Revit-context communication, while promoting clean architecture through dependency injection and service separation.

Key Features

  • RevitCommand — Base class for IExternalCommand with built-in transaction management, a per-execution DI scope, and structured failure handling. Supports transaction modes: None, Transaction, TransactionGroup, TransactionWithRollback, TransactionGroupWithRollback, and ReadOnly.
  • RevitApp / RevitAppBase / RevitDbApp — Base classes for IExternalApplication and IExternalDBApplication that wire up an IHost (Microsoft.Extensions.Hosting) for the add-in lifecycle, enabling full IoC container support via Autofac.
  • RevitTask — Enables safe execution of Revit API operations from any thread or async context using the IExternalEventHandler mechanism. Supports both result-returning and void tasks, with optional DI parameter resolution.
  • RevitEventHandler — Generic base class for subscribing to Revit application events with a per-invocation DI scope. Pre-built concrete handler bases are provided for all common document, application, and UI events.
  • RevitCommandAvailability — Base class for IExternalCommandAvailability with DI scope per availability check, enabling ribbon button state to be driven by injected services.
  • RevitHostBuilder — Configures the hosted application and registers Revit-specific services.
  • RevitUpdater — Base support for IUpdater (dynamic model update) implementations.
  • RevitSpatialContainmentResolver — Resolves spatial containment (rooms, spaces, zones).
  • RevitLinkGraphBuilder — Builds a graph of Revit link relationships for traversal and analysis.
  • RevitBasicFileInfo — Reads Revit file metadata without opening the document.

One Add-in per Assembly Load Context

Each RevitAppBase-derived application must run in its own AssemblyLoadContext. The framework stores the root DI service provider in a static field scoped to the load context, which means only one application instance is supported per context. Attempting to load a second application into the same context would silently overwrite the service provider, causing unpredictable behavior.

In practice this is not a restriction: every properly isolated add-in already runs in its own context. Use Scotec.Revit.Isolation to generate the required load context infrastructure automatically at compile time.

Getting Started

Install the NuGet package:

dotnet add package Scotec.Revit

Your project must target net8.0-windows or net10.0-windows.

Documentation

License

MIT License — https://licenses.nuget.org/MIT

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Scotec.Revit:

Package Downloads
Scotec.Revit.Wpf

Adds WPF support to Scotec.Revit.

Scotec.Revit.Ui

Adds UI support to Scotec.Revit.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2027.4.0-dev.4 62 6/20/2026
2027.3.4 146 6/15/2026
2027.3.3 110 6/10/2026
2026.4.0-dev.4 62 6/20/2026
2026.3.4 112 6/15/2026
2026.3.3 106 6/10/2026
2025.4.0-dev.4 71 6/20/2026
2025.3.4 126 6/15/2026
2025.3.3 109 6/10/2026
Loading failed