GetAllExternalResourceReferences Method (Document)


Gets the ids of all elements which refer to external resources.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2015

Syntax

C#
public static ISet<ElementId> GetAllExternalResourceReferences(
	Document document
)
Visual Basic
Public Shared Function GetAllExternalResourceReferences ( _
	document As Document _
) As ISet(Of ElementId)
Visual C++
public:
static ISet<ElementId^>^ GetAllExternalResourceReferences(
	Document^ document
)

Parameters

document
Type: Autodesk.Revit.DB Document
The Revit Document containing the external resource references.

Return Value

The ids of all elements which refer to external resources.

Remarks

This function will not return the ids of nested Revit links; it only returns top-level references.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

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 →