IsReferenceContainedByAValidHost Method


Identifies whether an element that contains the given reference can host reinforcement.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2023

Syntax

C#
public static bool IsReferenceContainedByAValidHost(
	Document doc,
	Reference reference
)
Visual Basic
Public Shared Function IsReferenceContainedByAValidHost ( _
	doc As Document, _
	reference As Reference _
) As Boolean
Visual C++
public:
static bool IsReferenceContainedByAValidHost(
	Document^ doc, 
	Reference^ reference
)

Parameters

doc
Type: Autodesk.Revit.DB Document
A document.
reference
Type: Autodesk.Revit.DB Reference
The reference that is part of the element that will be checked.

Return Value

True if the input Element can host reinforcement elements, false otherwise.

Remarks

Many different elements are allowed to host reinforcement, for example, beams, walls, columns, or parts. Often there are specific restrictions about whether an element can host rebar beyond its type or category. For example, the material type of the element may determine this. Or for parts, the part must have been created from layers that have their role set to Structure.

Exceptions

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

See Also