CoordinationModelLinkUtilsLinkCoordinationModelFromLocalPath Method |
Creates a Coordination Model instance using the absolute path of a .nwc or .nwd file and the linking options.
Namespace: Autodesk.Revit.DB.ExternalDataAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static Element LinkCoordinationModelFromLocalPath(
Document document,
string filePath,
CoordinationModelLinkOptions linkOptions
)
Public Shared Function LinkCoordinationModelFromLocalPath (
document As Document,
filePath As String,
linkOptions As CoordinationModelLinkOptions
) As Element
public:
static Element^ LinkCoordinationModelFromLocalPath(
Document^ document,
String^ filePath,
CoordinationModelLinkOptions^ linkOptions
)
static member LinkCoordinationModelFromLocalPath :
document : Document *
filePath : string *
linkOptions : CoordinationModelLinkOptions -> Element Parameters
- document Document
-
The document.
- filePath String
-
The file's absolute or relative path.
- linkOptions CoordinationModelLinkOptions
-
Options for linking.
Return Value
Element
Returns the newly added Coordination Model instance of the local .nwc or .nwd file.
Exceptions| Exception | Condition |
|---|
| ArgumentException |
Failed to validate file type.
-or-
document is not a project document.
|
| ArgumentNullException |
A non-optional argument was null
|
| FileArgumentNotFoundException |
The given filePath does not exist.
|
| InvalidOperationException |
The document is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
-or-
Failed to create Coordination Model instance from specified path.
|
| ModificationForbiddenException |
The document is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
-or-
The document is being loaded, or is in the midst of another
sensitive process.
|
| ModificationOutsideTransactionException |
The document has no open transaction.
|
Remarks In case the file path is not an absolute path, it is considered to be relative to the Revit document's saved path.
See Also