Application.CopyModel
Description:
Copies an existing model to a new file. Overwriting a file of the same name is allowed.
Copies an existing model to a new file. Overwriting a file of the same name is allowed.
public void CopyModel(
ModelPath sourceModelPath,
string destFilePath,
bool overwrite
)
-
sourceModelPathThe path of the file-based or server-based source model.
-
StringdestFilePathThe path of the destination file.
-
BooleanoverwriteTrue if the destination file can be overwritten; otherwise, false.
-
The given path sourceModelPath is a cloud path which is not supported in this method.
-
A non-optional argument was NULL
-
Access to the central model was denied. A possible reason is because the model was under maintenance.
-
The central model is missing. -or- An internal error happened on the central model, please contact the server administrator.
-
Thrown when the directory of destination file doesn't exist.
-
The destination file exists and can't be overwritten. -or- destFilePath is pointing to a folder that already exists and cannot be deleted.
-
The Revit model specified by sourceModelPath doesn't exist.
-
The destination file name includes one or more invalid characters.
-
The server-based central model could not be accessed because of a network communication error.
-
An internal error happened on the server, please contact the server administrator.