Updates a Revit link type from an IFC file and loads the linked document.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
C#
public bool UpdateFromIFC( Document document, ExternalResourceReference resourceReference, string revitLinkedFilePath, bool recreateLink )
Parameters
- document Document
- The document that contains Revit link.
- resourceReference ExternalResourceReference
- An external resource reference describing the source of the IFC file used in creation.
- revitLinkedFilePath String
- The path of the Revit file to create to hold the IFC information. This must be a full path.
- recreateLink Boolean
- If true, the Revit file will be updated based on the information in the IFC file. If false, the existing Revit file will be used.
Return Value
BooleanReturns true if the update succeeded, false otherwise.
Exceptions
Exception | Condition |
---|---|
ArgumentException | document is not a project document. -or- The server referenced by the ExternalResourceReference does not exist or does not implement IExternalResourceServer. -or- The server referenced by the ExternalResourceReference cannot support IFC links. -or- The ExternalResourceReference (resourceReference) is not in a format that is supported by its server. |
ArgumentNullException | A non-optional argument was null |
FileAccessException | The model cannot be accessed due to lack of access privileges. |
InvalidOperationException | The file is not allowed to access. -or- Revit cannot customize worksets for this model. |
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. |