Table of Contents

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 ModelExporter

Inheritance

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

options ModelExporterOptions

Export options (required)

bytesProgress IProgress<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.

cancellationToken CancellationToken

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

Returns

Task<string>

Path to the created RVT file