GetEndReference Method


Returns a reference to the end of a framing element according to the setback settings.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2015

Syntax

C#
public static Reference GetEndReference(
	FamilyInstance familyInstance,
	int end
)
Visual Basic
Public Shared Function GetEndReference ( _
	familyInstance As FamilyInstance, _
	end As Integer _
) As Reference
Visual C++
public:
static Reference^ GetEndReference(
	FamilyInstance^ familyInstance, 
	int end
)

Parameters

familyInstance
Type: Autodesk.Revit.DBFamilyInstance
The FamilyInstance, which must be of a structural framing category, non-concrete and joined.
end
Type: SystemInt32
The index of the end (0 for the start, 1 for the end).

Return Value

The end reference.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException end must be 0 or 1.
Autodesk.Revit.ExceptionsArgumentsInconsistentException The input familyInstance is not of a structural framing category or is concrete or is not joined at given end and cannot have an end reference set.

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 →