RebarCreateFreeForm(Document, RebarBarType, Element, IListCurveLoop, RebarStyle) Method |
Creates a free form rebar that will be unconstrained. Constraints can't be added later to this rebar.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static RebarFreeFormCreationResult CreateFreeForm(
Document doc,
RebarBarType barType,
Element host,
IList<CurveLoop> curves,
RebarStyle style
)
Public Shared Function CreateFreeForm (
doc As Document,
barType As RebarBarType,
host As Element,
curves As IList(Of CurveLoop),
style As RebarStyle
) As RebarFreeFormCreationResult
public:
static RebarFreeFormCreationResult^ CreateFreeForm(
Document^ doc,
RebarBarType^ barType,
Element^ host,
IList<CurveLoop^>^ curves,
RebarStyle style
)
static member CreateFreeForm :
doc : Document *
barType : RebarBarType *
host : Element *
curves : IList<CurveLoop> *
style : RebarStyle -> RebarFreeFormCreationResult 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 IListCurveLoop
-
Each curve loop represents a bar in the set.
- style RebarStyle
-
The usage of the bar, "standard" or "stirrup/tie".
Return Value
RebarFreeFormCreationResult
Returns a class that stores the newly created Free Form Rebar and the error code. If there is any error, the Rebar will be
.
Exceptions
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:
- The array of CurveLoops is empty.
- At least one CurveLoop is empty.
- At least one CurveLoop contains an unbounded curve.
- A rebar constructed from curves can't be bent according to the bending radius.
See Also