GetReference Method


This method will return the reference for the given fabrication id.

Namespace: Autodesk.Revit.DB.Steel
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2019

Syntax

C#
public static Reference GetReference(
	Document aDoc,
	Guid guid
)
Visual Basic
Public Shared Function GetReference ( _
	aDoc As Document, _
	guid As Guid _
) As Reference
Visual C++
public:
static Reference^ GetReference(
	Document^ aDoc, 
	Guid guid
)

Parameters

aDoc
Type: Autodesk.Revit.DBDocument
Document in which to search for the reference.
guid
Type: SystemGuid
The fabrication id for which a reference is required.

Return Value

The reference to the element or subelement corresponding to the given id.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →