Table of Contents

Class ExportExtensions

Namespace
RevitServerNet.Extensions
Assembly
RevitServerNet.dll

Convenience extensions to export models using RS libraries directly.

public static class ExportExtensions

Inheritance

Inherited Members

Methods

ExportModelAsync(RevitServerApi, string, string, string, bool, IProgress<long>)

Export a model using server host and version inferred from the API client.

public static Task<string> ExportModelAsync(this RevitServerApi api, string modelPath, string destinationFile, string assembliesPath = null, bool overwrite = false, IProgress<long> bytesProgress = null)

Parameters

api RevitServerApi
modelPath string
destinationFile string
assembliesPath string
overwrite bool
bytesProgress IProgress<long>

Returns

Task<string>

ExportModelAsync(RevitServerApi, string, string, bool, string, bool, IProgress<long>, CancellationToken)

Export a model using server host and version inferred from the API client.

public static Task<string> ExportModelAsync(this RevitServerApi api, string modelPath, string destinationFile, bool createLocal, string assembliesPath = null, bool overwrite = false, IProgress<long> bytesProgress = null, CancellationToken cancellationToken = default)

Parameters

api RevitServerApi

Client whose BaseUrl gives the host (without the HTTP port) and the year.

modelPath string

Model path in pipe format or Windows-style relative path.

destinationFile string

RVT file to create.

createLocal bool

Write the BasicFileInfo of a local copy, as RevitServerTool does (see RevitServerNet.ModelExporterOptions.CreateLocal).

assembliesPath string

Optional directory with the Revit Server client assemblies, searched first; skipped when it does not contain all of them (see RevitServerNet.ModelExporterOptions.AssembliesPath).

overwrite bool

Replace an existing destination file.

bytesProgress IProgress<long>

Bytes downloaded so far of the current model data file.

cancellationToken CancellationToken

Cancels the export.

Returns

Task<string>