Creates a free form rebar that can have constraints.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2018
Syntax
C# |
---|
public static Rebar CreateFreeForm( Document doc, Guid serverGUID, RebarBarType barType, Element host ) |
Visual Basic |
---|
Public Shared Function CreateFreeForm ( _ doc As Document, _ serverGUID As Guid, _ barType As RebarBarType, _ host As Element _ ) As Rebar |
Visual C++ |
---|
public: static Rebar^ CreateFreeForm( Document^ doc, Guid serverGUID, RebarBarType^ barType, Element^ host ) |
Parameters
- doc
- Type: Autodesk.Revit.DB..::..Document
A Document.
- serverGUID
- Type: System..::..Guid
The API server GUID. Should be the same that the function GetServerId() from class derived from IRebarUpdateServer returns. This server has the responsibility to calculate the bars of Rebar.
- barType
- Type: Autodesk.Revit.DB.Structure..::..RebarBarType
A RebarBarType element that defines bar diameter, bend radius and material of the rebar.
- host
- Type: Autodesk.Revit.DB..::..Element
The element to which the rebar belongs. The element must support rebar hosting.
Return Value
The newly created free form Rebar Instance.
Remarks
It requires a server GUID which will have the responsibility to define bar handles(which will be constrained) and to do the calculation of the curves.
See IRebarUpdateServer for more details.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | host is not a valid rebar host. -or- The server with serverGUID was not registered for RebarUpdateService. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..DisabledDisciplineException | None of the following disciplines is enabled: Structural. |