SetFromRebar Method


Set an instance of a RebarContainerItem element according to a Rebar parameters. Will throw exception if given rebar is not shape driven. Will throw exception if given rebar has moved bars in set.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2016

Syntax

C#
public void SetFromRebar(
	Rebar rebar
)
Visual Basic
Public Sub SetFromRebar ( _
	rebar As Rebar _
)
Visual C++
public:
void SetFromRebar(
	Rebar^ rebar
)

Parameters

rebar
Type: Autodesk.Revit.DB.StructureRebar
The Rebar.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The RebarShape of rebar has End Treatments -or- Can't create container from free-form rebar. -or- Can't create container from Rebar with moved bars. -or- Can't create container from Rebar which has excluded bars other than the first and last one.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →