Share

Rebar.CreateFreeForm(Document, RebarBarType, Element, IList<CurveLoop>, RebarFreeFormValidationResult) Method

Note: This API is now obsolete.

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.1.0.0 (26.1.0.34)

Syntax

C#

[ObsoleteAttribute("This method is deprecated in Revit 2026 and may be removed in a later version of Revit. Please use Rebar.CreateFreeForm(Document doc, RebarBarType barType, Element host, IList(CurveLoop) curves, RebarStyle style) instead.")]
public static Rebar CreateFreeForm(
	Document doc,
	RebarBarType barType,
	Element host,
	IList<CurveLoop> curves,
	out RebarFreeFormValidationResult error
)

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<CurveLoop>
Each curve loop represents a bar in the set.
error  RebarFreeFormValidationResult%
Will be Success(0) if everything is ok, otherwise the failure reason.

Return Value

Rebar
The newly created free form Rebar Instance.

Exceptions

ExceptionCondition
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:

  • 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 (the considered Rebar Style is Standard).

See Also

Reference

Was this information helpful?