SetBarIncluded Method


Sets if the bar at the desired index is included or not.

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

Syntax

C#
public void SetBarIncluded(
	bool include,
	int barPositionIndex
)
Visual Basic
Public Sub SetBarIncluded ( _
	include As Boolean, _
	barPositionIndex As Integer _
)
Visual C++
public:
void SetBarIncluded(
	bool include, 
	int barPositionIndex
)

Parameters

include
Type: SystemBoolean
True to include the bar, false to exclude the bar.
barPositionIndex
Type: SystemInt32
The bar index.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentOutOfRangeException barPositionIndex is not in the range [ 0, NumberOfBarPositions-1 ].
Autodesk.Revit.ExceptionsInapplicableDataException For this RebarInSystem element individual bars can't be moved, excluded or included.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →