Class ModelExporter
- Namespace
- RevitServerNet
- Assembly
- RevitServerNet.dll
Public entry point for exporting a Revit Server model to a local RVT file using RS libraries directly (no RevitServerTool.exe).
public static class ModelExporterInheritance
Inherited Members
Methods
ExportAsync(ModelExporterOptions, IProgress<long>, CancellationToken)
Export a Revit Server model to a local RVT file using RS libraries directly. Overlapping exports of the same model are serialized only within one Windows session and only when ServerHost is spelled the same and ModelPipePath has the same case (path separators are normalized); otherwise one export can release the other's server read lock.
public static Task<string> ExportAsync(ModelExporterOptions options, IProgress<long> bytesProgress = null, CancellationToken cancellationToken = default)Parameters
optionsModelExporterOptions-
Export options (required)
bytesProgressIProgress<long>-
Optional progress reporter: bytes downloaded so far of the current model data file. Called on a thread-pool thread: use System.Progress<T> or marshal to the UI thread yourself.
cancellationTokenCancellationToken-
Cancels the export, also while it is still connecting to an unreachable server; the server read lock is still released and the temp folder deleted