RevitServerAPILib 0.1.10

A .NET Class library for accessing and manipulating Revit Server through its REST API.

Install-Package RevitServerAPILib -Version 0.1.10
dotnet add package RevitServerAPILib --version 0.1.10
<PackageReference Include="RevitServerAPILib" Version="0.1.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RevitServerAPILib --version 0.1.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RevitServerAPILib, 0.1.10"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Revit Server API Library

A .NET Class library for accessing and manipulating Revit Server through its REST API.

Usage

The REST API of a Revit Server is accessed by creating an instance of the RevitServer class.

RevitServer server = new RevitServer("HOSTNAME",2015);

Methods on this class can be used to query information from and manipulate the models on the target server.

//Create a new RevitServer instance
RevitServerAPILib.RevitServer server = new RevitServerAPILib.RevitServer("HOSTNAME", 2015);

//Get properties of the server
var properties = server.GetServerProperties();

//Rename a model
server.Rename(@"Folder\File.rvt","NewFileName.rvt");

//Lock a model
server.Lock(@"Folder\File.rvt");

//List the history of a model
var history = server.GetModelHistory(@"Folders\File.rvt");
foreach(var item in history.Items.OrderByDescending(i=>i.VersionNumber))
{
     Console.WriteLine("{0}\t{1}\t{2}",item.Date.ToString(),item.User, item.Comment);
}

//List the models contained by a folder
var folderContents = server.GetFolderContents(@"Folder\SubFolder");

foreach (var model in folderContents.Models)
{
    Console.WriteLine("{0}\t{1}\t{2}",model.Name,model.LockState.ToString(),model.ModelSize.ToString());
}

Revit Server API Library

A .NET Class library for accessing and manipulating Revit Server through its REST API.

Usage

The REST API of a Revit Server is accessed by creating an instance of the RevitServer class.

RevitServer server = new RevitServer("HOSTNAME",2015);

Methods on this class can be used to query information from and manipulate the models on the target server.

//Create a new RevitServer instance
RevitServerAPILib.RevitServer server = new RevitServerAPILib.RevitServer("HOSTNAME", 2015);

//Get properties of the server
var properties = server.GetServerProperties();

//Rename a model
server.Rename(@"Folder\File.rvt","NewFileName.rvt");

//Lock a model
server.Lock(@"Folder\File.rvt");

//List the history of a model
var history = server.GetModelHistory(@"Folders\File.rvt");
foreach(var item in history.Items.OrderByDescending(i=>i.VersionNumber))
{
     Console.WriteLine("{0}\t{1}\t{2}",item.Date.ToString(),item.User, item.Comment);
}

//List the models contained by a folder
var folderContents = server.GetFolderContents(@"Folder\SubFolder");

foreach (var model in folderContents.Models)
{
    Console.WriteLine("{0}\t{1}\t{2}",model.Name,model.LockState.ToString(),model.ModelSize.ToString());
}

Release Notes

Replaced logging with LibLog to MinLibLog https://github.com/aireq/MinLibLog

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.10 310 6/13/2019
0.1.9 298 6/5/2019
0.1.8 522 7/12/2018
0.1.7 469 7/12/2018
0.1.6 582 3/8/2018
0.1.5 517 3/8/2018
0.1.4 627 1/10/2017
0.1.3 584 11/2/2016
0.1.2 551 10/27/2016
0.1.1 527 10/26/2016
0.1.0 711 10/26/2016