Revit Server Model Creation Command-Line Utility

You can use the Revit Server model creation command-line utility (RevitServerTool.exe) to automate the creation of local models to facilitate server-based worksharing.

You can place new local models directly onto team members' computers or into directories where they can be accessed.

RevitServerTool.exe is installed automatically on any computers where you install Revit or Revit Server with either the Host or Accelerator role enabled.

On a Revit user's computer, the default location of the tool is:%ProgramFiles%\Autodesk\Autodesk Revit 2022INSTALLDIR\RevitServerToolCommand\. On instances of Revit Server, the default location of the tool is:%ProgramFiles%\Autodesk\Autodesk Revit 2022\tools\RevitServerToolCommand.

Note: In order to use this command-line utility, you should be familiar with DOS and understand the structure of command lines. Note also that this utility only works with the corresponding version of Revit Server; that is the 2022 version of RevitServerTool.exe only works with the 2022 version of Revit Server.

Commands and Options

Command Result
l, createLocalRvt Creates a local model from the specified server-based central model.
RevitServerTool -? Displays help for the RevitServerTool utility.
Options Result
<model path> A model path relative to the Revit Server project directory (for example: "Hospital \North Wing.rvt"). This is a required argument.
-d, -destination A path that specifies the location and file name of the new model. Absolute, relative, and UNC paths are supported. By default, the new model is created in the subfolder "RevitServerTool" under the user's Documents folder. For example, C:\\Users|<username>\Document\RevitServerTool\<modelname>.rvt
Note: If the new model name is not specified in the destination path, the name of the server-based central model is used by default.
-s, -server Name of the Revit Server Host where the central model resides. This is a required argument.
-a, -accelerator Name of the Revit Server Accelerator. When this argument is not provided, the utility checks the RSACCELERATOR2022 environment variable to determine if an Accelerator is assigned and, if so, uses the cached data on that Accelerator if it is up to date. If no Accelerator is listed, the utility copies the central model data directly from the Revit Server Host. Likewise, if the Accelerator name is invalid, or the Accelerator is down, the data is retrieved directly from the Host.
-o, -overwrite Overwrites the destination model if it already exists.

Usage:

RevitServerTool createLocalRVT <model path> [-s | -server <server name>] [-a | -accelerator <accelerator name>] [-d|-destination <path>] [-o|-overwrite]

Usage Result
RevitServerTool createLocalRVT <model path> [-server <server name>] A local copy of the central model specified by the model path on the specified Revit Server Host is created in the user's personal directory using the user name defined in the OS.
RevitServerTool createLocalRVT <model path> [-server <server name>] [-destination <path>] [-overwrite] A local copy of the central model specified by the model path on the specified Revit Server Host is created at the destination path location, overwriting any previous version that exists there.
RevitServerTool createLocalRVT <model path> [-server <server name>] [-destination <path>] [-accelerator <accelerator name>] A local copy of the central model specified by the model path on the specified Revit Server Host is created from the cache on the specified Revit Server Accelerator and placed at the specified destination.

Command-Line Usage Examples

Note: The use of quotation marks in the examples below is required to correctly process arguments containing spaces.

To create a local model from a central model called As-Built complex.rvt found in the directory 2022 Hospital Project on the Revit Server Host named SERVER01

  • RevitServerTool createLocalRvt "2022 Hospital Project\As-Built complex.rvt" -s SERVER01 -o
  • OR

  • RevitServerTool L "2022 Hospital Project\As-Built complex.rvt" -s SERVER01 -o

To create a local model from this same central model, giving it the name As-Built complex myLocal.rvt and storing it in the folder C:\local files

  • RevitServerTool createLocalRvt "2022 Hospital Project\As-Built complex.rvt" -s SERVER01 -d "c:\local files\As-Built complex_myLocal.rvt" -o
  • OR

  • RevitServerTool L "2022 Hospital Project\As-Built complex.rvt" -s SERVER01 -d "c:\local files\As-Built complex_myLocal.rvt" - o

Usage Notes

Error Conditions and Utility Responses

Condition: The user specifies model path, but does not specify the required -server argument.

Response: Command is missing the required argument, server.

Condition:The specified model path does not exist on the server.

Response: Cannot create the local model because the model "<model path>" does not exist on the Revit server "<server>".

Condition: The specified destination path does not exist. If the user has permissions, the new path will be created, and the new model will be placed there.

Response:The local model "<destination path>" is successfully created.

Condition:The destination path (new model) already exists and the user has not explicitly used the [-overwrite] option.

Response: Cannot create the local model because the model "<model path>" already exists.

Condition: The specified server is not accessible, or the network drops out.

Response: Cannot create the local model because Revit server is currently not available.

Condition:The model on the server is currently in use.

Response: Cannot create the local model because the model "<model path>" is currently in use.

Condition:

Execution failed for unknown reasons, or because the model is corrupt, or the user does not have access to the destination path, or the total path length of the destination path is greater than 255, or the user has not specified the destination path, but the path could not be created.

Response: Cannot create the local model at the location "<destination path>".