Revit 2026 API
Rebar |
Returns a set of ElementIds for Elements joined to the provided host element.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static ISet<ElementId> GetRebarHostDirectNeighbors( Element hostElement )
Public Shared Function GetRebarHostDirectNeighbors ( hostElement As Element ) As ISet(Of ElementId)
public: static ISet<ElementId^>^ GetRebarHostDirectNeighbors( Element^ hostElement )
static member GetRebarHostDirectNeighbors : hostElement : Element -> ISet<ElementId>
Parameters
- hostElement Element
- The host element. Must be an element that can host reinforcement.
Return Value
ISetElementIdThe neighbor ids.

Exception | Condition |
---|---|
ArgumentException | hostElement is not a valid rebar host. |
ArgumentNullException | A non-optional argument was null |

This function returns the first level of neighbors for the provided host, meaning elements that are joined directly to the provided host element (not the neighbors of the joined elements also).
These elements can also host reinforcement.
See Also