Element.GetExternalResourceReference Method

ElementGetExternalResourceReference Method

Gets the ExternalResourceReference associated with a specified external resource type.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public ExternalResourceReference GetExternalResourceReference(
	ExternalResourceType resourceType
)
Public Function GetExternalResourceReference ( 
	resourceType As ExternalResourceType
) As ExternalResourceReference
public:
ExternalResourceReference^ GetExternalResourceReference(
	ExternalResourceType^ resourceType
)
member GetExternalResourceReference : 
        resourceType : ExternalResourceType -> ExternalResourceReference 

Parameters

resourceType  ExternalResourceType
The desired external resource type.

Return Value

ExternalResourceReference
The copy of the ExternalResourceReference associated with a specified external resource type.
Exceptions
ExceptionCondition
ArgumentException This Element does not use a resource reference for the specified resource type.
ArgumentNullException A non-optional argument was null
Remarks
For an element which has multiple external resource references under a specified type like AppearanceAssetElement, it will return the first one. See also: [!:Autodesk::Revit::DB::Element::getExternalResourceReferenceExpanded].
See Also