RebarCreateFreeForm(Document, RebarBarType, Element, IListIListCurve, RebarFreeFormValidationResult) 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: 25.0.0.0 (25.0.0.0)
Syntaxpublic static Rebar CreateFreeForm(
Document doc,
RebarBarType barType,
Element host,
IList<IList<Curve>> curves,
out RebarFreeFormValidationResult error
)
Public Shared Function CreateFreeForm (
doc As Document,
barType As RebarBarType,
host As Element,
curves As IList(Of IList(Of Curve)),
<OutAttribute> ByRef error As RebarFreeFormValidationResult
) As Rebar
public:
static Rebar^ CreateFreeForm(
Document^ doc,
RebarBarType^ barType,
Element^ host,
IList<IList<Curve^>^>^ curves,
[OutAttribute] RebarFreeFormValidationResult% error
)
static member CreateFreeForm :
doc : Document *
barType : RebarBarType *
host : Element *
curves : IList<IList<Curve>> *
error : RebarFreeFormValidationResult byref -> Rebar
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 IListIListCurve
-
Each array of curves represent a bar in the set.
- error RebarFreeFormValidationResult
-
Will be Success if everything is ok, otherwise the failure reason.
Return Value
Rebar
The newly created free form Rebar Instance.
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:
- 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.
See Also