Revit 2018 API |
Rebar..::..SetHostId Method |
Rebar Class See Also |
The element that contains the rebar.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.0)
Since:
2009
Syntax
C# |
---|
public void SetHostId( Document doc, ElementId hostId ) |
Visual Basic |
---|
Public Sub SetHostId ( _ doc As Document, _ hostId As ElementId _ ) |
Visual C++ |
---|
public: void SetHostId( Document^ doc, ElementId^ hostId ) |
Parameters
- doc
- Type: Autodesk.Revit.DB..::..Document
The document containing both this element and the host element.
- hostId
- Type: Autodesk.Revit.DB..::..ElementId
The element that the rebar object belongs to, such as a structural wall, floor, foundation, beam, brace or column. The rebar does not need to be strictly inside the host, but it must be assigned to one host element.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | hostId is not a legal Rebar host (see the RebarHostData class). |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..DisabledDisciplineException | None of the following disciplines is enabled: Structural. |