2027 Method
Changes 8
M

CoordinationModelLinkUtils.LinkCoordinationModelFromLocalPath

Description:
Creates a Coordination Model instance using the absolute path of a .nwc or .nwd file and the linking options.
Remarks:

In case the file path is not an absolute path, it is considered to be relative to the Revit document's saved path.

public static Element LinkCoordinationModelFromLocalPath(
	Document document,
	string filePath,
	CoordinationModelLinkOptions linkOptions
)
Return Value Element Returns the newly added Coordination Model instance of the local .nwc or .nwd file.
  • Failed to validate file type. -or- document is not a project document.
  • A non-optional argument was null
  • The given filePath does not exist.
  • 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.
  • 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.
  • The document has no open transaction.