IsExternalFileReference Method


External File Utils Is External File Reference Method

Determines whether the given element represents an external file.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool IsExternalFileReference(
	Document aDoc,
	ElementId elemId
)

Parameters

aDoc Document
A Revit Document.
elemId ElementId
The element to be checked for an external file reference.

Return Value

Boolean
True if the given element represents an external file; false otherwise.
Exceptions
Exception Condition
ArgumentException The element elemId does not exist in the document
ArgumentNullException A non-optional argument was null
Remarks

CAD imports are not external file references, as their data is brought fully into Revit. No connection is maintained to the original file.

A link may be an external resource without being an external file.

See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →