Alexpivo394.Revit.Export 2027.1.5

dotnet add package Alexpivo394.Revit.Export --version 2027.1.5
                    
NuGet\Install-Package Alexpivo394.Revit.Export -Version 2027.1.5
                    
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="Alexpivo394.Revit.Export" Version="2027.1.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Alexpivo394.Revit.Export" Version="2027.1.5" />
                    
Directory.Packages.props
<PackageReference Include="Alexpivo394.Revit.Export" />
                    
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 Alexpivo394.Revit.Export --version 2027.1.5
                    
#r "nuget: Alexpivo394.Revit.Export, 2027.1.5"
                    
#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 Alexpivo394.Revit.Export@2027.1.5
                    
#: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=Alexpivo394.Revit.Export&version=2027.1.5
                    
Install as a Cake Addin
#tool nuget:?package=Alexpivo394.Revit.Export&version=2027.1.5
                    
Install as a Cake Tool

<h1 align="center">ToadExport</h1>

<p align="center"> Unattended export of Revit models to RVT and NWC, as a library.<br> Revit 2020–2027. </p>

<p align="center"> <a href="https://www.nuget.org/packages/Alexpivo394.Revit.Export"><img src="https://img.shields.io/nuget/v/Alexpivo394.Revit.Export?label=Revit.Export" alt="Alexpivo394.Revit.Export on NuGet"></a> <a href="https://www.nuget.org/packages/Alexpivo394.Revit.Export.Sources"><img src="https://img.shields.io/nuget/v/Alexpivo394.Revit.Export.Sources?label=Revit.Export.Sources" alt="Alexpivo394.Revit.Export.Sources on NuGet"></a> <a href="https://github.com/Alexpivo394/ToadExport/actions/workflows/Build.yml"><img src="https://img.shields.io/github/actions/workflow/status/Alexpivo394/ToadExport/Build.yml?label=build" alt="Build"></a> <a href="License.md"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a> </p>


ToadExport is the export core behind the ToadExporter add-in in ToadTools and the scheduled exports of ToadFlow. It has no UI: you give it a model path and an output folder, it gives you a clean RVT, an NWC, or both, and tells you exactly what happened.

It is written for batch runs that nobody watches, so the awkward cases are handled rather than left to a dialog box:

  • Never upgrades a model by accident. The version guard reads the Revit year from the .rvt file and refuses a model saved in another release, unless you set AllowUpgrade.
  • Never touches the source. A model is opened detached from central, with worksets preserved.
  • Opens fast. With SkipLinks, the model is copied to a temporary folder and opened with its links unloaded; worksets can be filtered by keyword.
  • Cleans the RVT. Removes Revit links, CAD imports, and point clouds, purges unused elements (Revit 2024 and later), and compacts the file.
  • Exports NWC by 3D view with every Navisworks exporter option exposed, and answers the exporter's dialogs itself.
  • Leaves no half-written files. The result is staged and then published; when an export fails, the previous file stays in place.
  • Says when a retry is worth it. The result separates a broken model from a Revit glitch that usually passes in a fresh Revit process.

Packages

Package Targets Revit API What it does
Alexpivo394.Revit.Export per Revit year yes Exports one model inside the Revit API context
Alexpivo394.Revit.Export.Sources net47, net8.0, net10.0 no Lists models on Revit Server or in a folder; reads the Revit year of an .rvt

The version of Alexpivo394.Revit.Export starts with the Revit year: use 2024.* for Revit 2024.

Exporting a model

<PackageReference Include="Alexpivo394.Revit.Export" Version="$(RevitVersion).*"/>
var exporter = new ModelExporter(application);

ModelResult result = exporter.Export(
    new ModelJob("AR.rvt", @"\\nas\projects\AR.rvt", IsServer: false, Rvt: true, Nwc: true),
    new ExportOptions { AllowUpgrade = false, NwcViewName = "Navisworks" },
    outputFolder: @"\\nas\exports",
    progress,   // IExportProgress: status text, progress, and the abort flag
    log);       // IExportLog: one line per step

Export runs in the Revit API context and does not throw on a bad model. Everything is in the result:

Member Meaning
Rvt, Nwc Done, Skipped, Failed, or NotRequested for each format
Note Why a step was skipped, or the error text
RevitFailure Revit failed internally, not the model. A retry in a new Revit process usually passes
NwcMissing The view exists but the exporter produced no file. Worth a retry
CloseFailed The model could not be closed. Restart Revit before reusing the process

RunValidator.Errors(jobs, options, outputFolder) checks a whole run before the first model is opened: an empty job list, a missing NWC view name, an output folder that is not writable, or one that would overwrite a source model.

Finding models

<PackageReference Include="Alexpivo394.Revit.Export.Sources" Version="1.*"/>

Sources has no Revit dependency, so a service or a settings window can browse models without starting Revit.

ITreeSource server = new RevitServerSource("revit-server-01", "2024");   // Revit Server REST API
ITreeSource folder = new FolderSource(@"\\nas\projects");

foreach (SourceEntry entry in await server.GetChildrenAsync(server.RootPath, ct))
    Console.WriteLine(entry.IsFolder ? $"[{entry.Name}]" : entry.ModelPath);

int? year = RvtFileInfo.TryReadYear(@"\\nas\projects\AR.rvt");   // 2024, without opening Revit

ServerCatalog wraps a source with a cache on disk, so a large Revit Server tree opens instantly and refreshes in the background.

Building

Requires the .NET 10 SDK.

dotnet test --project tests/Alexpivo394.Revit.Export.Tests
dotnet build source/Alexpivo394.Revit.Export -c Release.R24

Each Revit year has its own configuration, from Release.R20 to Release.R27. The tests cover everything that runs without Revit.

To pack locally, run the build pipeline. It writes 0.0.0-dev packages to output/:

cd build
$env:DOTNET_ENVIRONMENT = "Development"; dotnet run -c Release -- pack

Releasing

A tag X.Y.Z publishes Alexpivo394.Revit.Export as {year}.X.Y.Z for every Revit year from 2020 to 2027 and Alexpivo394.Revit.Export.Sources as X.Y.Z, then creates a GitHub release with the packages attached.

Project Role
ToadTools Revit add-ins; ToadExporter is the UI for this library
ToadFlow Runs exports on a schedule across a farm of Revit machines
ToadParamCheck The sibling core for parameter (LOI) checks

Missing something? Open an issue.

License

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2027.1.5 96 11/23/2026
2027.1.4 130 10/28/2026
2027.1.3 102 10/27/2026
2026.1.5 86 11/23/2026
2026.1.4 108 10/28/2026
2026.1.3 104 10/27/2026
2025.1.5 85 11/23/2026
2025.1.4 110 10/28/2026
2025.1.3 109 10/27/2026
2024.1.5 82 11/23/2026
2024.1.4 103 10/28/2026
2024.1.3 103 10/27/2026
2023.1.5 83 11/23/2026
2023.1.4 113 10/28/2026
2022.1.5 85 11/23/2026
2022.1.4 110 10/28/2026
2021.1.5 83 11/23/2026
2021.1.4 102 10/28/2026
2020.1.5 83 11/23/2026
2020.1.4 108 10/28/2026
Loading failed