CreateNewLocal Method


Takes a path to a central model and copies the model into a new local file for the current user.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2014

Syntax

C#
public static void CreateNewLocal(
	ModelPath sourcePath,
	ModelPath targetPath
)
Visual Basic
Public Shared Sub CreateNewLocal ( _
	sourcePath As ModelPath, _
	targetPath As ModelPath _
)
Visual C++
public:
static void CreateNewLocal(
	ModelPath^ sourcePath, 
	ModelPath^ targetPath
)

Parameters

sourcePath
Type: Autodesk.Revit.DBModelPath
The path to the central model.
targetPath
Type: Autodesk.Revit.DBModelPath
The path to put the new local file.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The given path sourcePath is a cloud path which is not supported in this method. -or- The model is not workshared. -or- The central model has not fully enabled worksharing. It must be opened and resaved to finish enabling worksharing. -or- The model is a local file. -or- The central model is not saved in the current Revit version. -or- The model is transmitted. -or- -or- The specified filepath is invalid.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsCentralModelAccessDeniedException Access to the central model was denied due to lack of access privileges. -or- Access to the central model was denied. A possible reason is because the model was under maintenance.
Autodesk.Revit.ExceptionsCentralModelContentionException The central model is locked by another user. -or- The central model is being accessed by another client.
Autodesk.Revit.ExceptionsCentralModelException The central model is missing. -or- An internal error happened on the central model, please contact the server administrator.
Autodesk.Revit.ExceptionsFileArgumentAlreadyExistsException The file or folder already exists and cannot be overwritten.
Autodesk.Revit.ExceptionsInvalidOperationException This functionality is not available in Revit LT. -or- File already exists! -or- Revit Server does not support local models.
Autodesk.Revit.ExceptionsRevitServerCommunicationException The server-based central model could not be accessed because of a network communication error.
Autodesk.Revit.ExceptionsRevitServerInternalException An internal error happened on the server, please contact the server administrator.

See Also