GetReferenceByName Method


Gets the family instance reference corresponding to the named reference plane in the instance's family.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.0.0.420)
Since: 2018

Syntax

C#
public Reference GetReferenceByName(
	string name
)
Visual Basic
Public Function GetReferenceByName ( _
	name As String _
) As Reference
Visual C++
public:
Reference^ GetReferenceByName(
	String^ name
)

Parameters

name
Type: System String
The name of the reference plane in the family.

Return Value

Returns the family instance reference corresponding to the named reference plane in the instance's family. Returns null if there is no reference plane with this name in the family, or if the plane exists but its "Is Reference" property is "Not a Reference", or if the input string is empty.

Remarks

If there is a reference plane in the instance's family that has the given name, and the plane's "Is Reference" property is not "Not a Reference", there will be a corresponding reference in the family's instance. This function returns that reference.

Exceptions

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

See Also