Releases: Nice3point/RevitToolkit
2025.0.4-preview.1.0
- New
Context.UiControlledApplication
property. Helps to manipulate with the Revit ribbon, context menus outside ExternalApplication. - Removed AssemblyLoadContext for addins isolation. It will be moved to Revit itself. More info.
- Removed deprecated features.
Full changelog: 2025.0.3...2025.0.4-preview.1.0
2025.0.3
- Removed JetBrains.Annotations dependency
- Fixed typo in summary
Full changelog: 2025.0.2...2025.0.3
2025.0.2
- Context global handlers:
- SuppressFailures: suppresses the display of the Revit error and warning messages during transaction.
By default, Revit uses manual error resolution control with user interaction.
This method provides automatic resolution of all failures without notifying the user or interrupting the program - SuppressDialogs: suppresses the display of the Revit dialogs
- SuppressFailures: suppresses the display of the Revit error and warning messages during transaction.
- Context global properties:
- IsRevitInApiMode: determines whether Revit is in API mode or not.
- Document is obsolete. Use ActiveDocument instead.
- UiDocument is obsolete. Use ActiveUiDocument instead.
- ExternalCommand.SuppressFailures is obsolete. Use Context class instead.
- ExternalCommand.SuppressDialogs is obsolete. Use Context class instead.
- ActionEventHandler now understands when it is in a Revit context and calls the handler immediately, without adding to the queue.
- AsyncEventHandler now understands when it is in a Revit context and calls the handler immediately, without adding to the queue.
Awaiting withawait
keyword will not cause a context switch, and you can still call API requests in the main Revit thread. - Nullable types support
- Assembly load context internal optimizations
- Readme updates, include extra samples
Full changelog: 2025.0.1...2025.0.2
2025.0.2-preview.2.0
- Context global handlers:
- SuppressFailures: suppresses the display of the Revit error and warning messages during transaction.
By default, Revit uses manual error resolution control with user interaction.
This method provides automatic resolution of all failures without notifying the user or interrupting the program - SuppressDialogs: suppresses the display of the Revit dialogs
- SuppressFailures: suppresses the display of the Revit error and warning messages during transaction.
- Context global properties:
- IsRevitInApiMode: determines whether Revit is in API mode or not.
- ExternalCommand class:
- SuppressFailures is obsolete. Use Context class instead.
- SuppressDialogs is obsolete. Use Context class instead.
- ActionEventHandler now understands when it is in a Revit context and calls the handler immediately, without adding to the queue.
- AsyncEventHandler now understands when it is in a Revit context and calls the handler immediately, without adding to the queue.
Awaiting withawait
keyword will not cause a context switch, and you can still call API requests in the main Revit thread. - Nullable types support
- Assembly load context internal optimizations
- Readme updates, include extra samples
Full changelog: 2025.0.2-preview.1.0...2025.0.2-preview.2.0
2025.0.2-preview.1.0
- Context global handlers:
- SuppressFailures: suppresses the display of the Revit error and warning messages during transaction.
By default, Revit uses manual error resolution control with user interaction.
This method provides automatic resolution of all failures without notifying the user or interrupting the program - SuppressDialogs: suppresses the display of the Revit dialogs
- SuppressFailures: suppresses the display of the Revit error and warning messages during transaction.
- Context global properties:
- IsRevitInApiMode: determines whether Revit is in API mode or not
- Nullable types support
- Assembly load context internal optimizations
- Readme updates, include extra samples
Full changelog: 2025.0.1...2025.0.2-preview.1.0
2025.0.1
Add-in dependency isolation
This release introduces an isolated plugin dependency container using .NET AssemblyLoadContext.
This feature allows plugins to run in a separate, isolated context, ensuring independent execution and preventing conflicts from incompatible library versions.
This enhancement is available for Revit 2025 and higher, addressing the limitations of Revit's traditional plugin loading mechanism, which loads plugins by path without native support for isolation.
How It Works:
The core functionality centers on AssemblyLoadContext, which creates an isolated container for each plugin.
When a plugin is loaded, it is assigned a unique AssemblyLoadContext instance, encapsulating the plugin and its dependencies to prevent interference with other plugins or the main application.
To use this isolation feature, developers must inherit their classes from:
- ExternalCommand
- ExternalApplication
- ExternalDbApplication
- ExternalCommandAvailability
These classes contain the built-in isolation mechanism under the hood.
Plugins using interfaces such as IExternalCommand will not benefit from this isolation and will run in the default context.
Limitations:
- The isolated plugin context feature is available starting with Revit 2025.
- For older Revit versions, this library uses a ResolveHelper to help load dependencies from the plugin's folder, but does not protect against conflicts arising from incompatible packages.
- Additionally, plugins that do not inherit from the specified classes will not be isolated and may experience compatibility issues if they rely on the default context.
Improvements
-
Added ExternalCommandAvailability class.
Starting with Revit 2025, ExternalCommandAvailability uses AssemblyLoadContext to isolate dependencies.
If your implementation does not include dependencies, use the IExternalCommandAvailability interface to reduce memory allocation -
Added AvailableCommandController class.
IExternalCommandAvailability implementation.
Controller providing permanent accessibility for External Command invocation. This means that it will always be available for execution, even when no Document is open. Usage:panel.AddPushButton<StartupCommand>("Execute") .SetAvailabilityController<AvailableCommandController>()
Full changelog: 2025.0.0...2025.0.1
2025.0.0
- Revit 2025 support
- Add new DuplicateTypeNamesHandler overload
- Optimize assembly resolve by @dosymep
- Fix resolve raw assembly by @dosymep
Full changelog: 2024.0.1...2025.0.0
2024.0.1
-
New Context class.
Provides computed properties to retrieve Revit objects in the current session. Values are provided even outside the Revit context.
- Context.UiApplication;
- Context.Application;
- Context.UiDocument;
- Context.Document;
- Context.ActiveView;
- Context.ActiveGraphicalView;
- Context.ActiveView;
Context.Document.Create.NewFamilyInstance(); Context.ActiveView = view;
-
New FrameworkElementCreator. Creates FrameworkElements for the dock pane.
DockablePaneProvider.Register(application) .SetId(guid) .SetTitle(title) .SetConfiguration(data => { data.FrameworkElementCreator = new FrameworkElementCreator<DockPaneView>(); });
Available overloading with IServiceProvider, in case you use hosting.
-
ResolveHelper reworked. Now you need to specify a type to resolve dependencies. The directory where the type is defined will be used to search for dependencies.
Enabled by default for all ExternalCommand and ExternalApplication, so only needed for direct invocation in special cases.
The current version now disables all resolvers used in the domain to avoid conflicts, and to bypass cases where Revit loaded assemblies from another plugin's folder.
try { ResolveHelper.BeginAssemblyResolve<DockView>(); window.Show(); } finally { ResolveHelper.EndAssemblyResolve(); }
Full changelog: 2024.0.0...2024.0.1
2024.0.0
- Revit 2024 support
- New SaveSharedCoordinatesCallback
- New ExternalDbApplication
ExternalCommand:
- New SuppressFailures method
2023.0.12
New runtime attributes: init, required keywords support