Creates a free form rebar that will be unconstrained. Constraints can't be added later to this rebar.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static RebarFreeFormCreationResult CreateFreeForm( Document doc, RebarBarType barType, Element host, IList<IList<Curve>> curves, RebarStyle style )
Parameters
- doc Document
- A document.
- barType RebarBarType
- A RebarBarType element that defines bar diameter, bend radius and material of the rebar.
- host Element
- The element to which the rebar belongs. The element must support rebar hosting.
- curves IList<IList<Curve>>
- Each array of curves represent a bar in the set.
- style RebarStyle
- The usage of the bar, "standard" or "stirrup/tie".
Return Value
RebarFreeFormCreationResultReturns a class that stores the newly created Free Form Rebar and the error code. If there is any error, the Rebar will be null.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | host is not a valid rebar host. |
| ArgumentNullException | A non-optional argument was null |
| ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |
Remarks
The created rebar will have curves.Count bars. The layout will be Single if curves.Count is 1, otherwise will be Fixed Number and will not be changeable. Setting a new list of curves will only change the number of bars in set.This function can fail due to following reasons:
- One or more of the input curves was null.
- One or more of the input curves was unbounded.
- Curves doesn't form a valid curve loop, it forms 0, 2 or more curve loops.
- A rebar constructed from curves can't be bent according to the bending radius.
