SetBarHiddenStatus Method


Sets the bar in this rebar set to be hidden or unhidden in the given view.

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

Syntax

C#
public void SetBarHiddenStatus(
	View view,
	int barIndex,
	bool hide
)
Visual Basic
Public Sub SetBarHiddenStatus ( _
	view As View, _
	barIndex As Integer, _
	hide As Boolean _
)
Visual C++
public:
void SetBarHiddenStatus(
	View^ view, 
	int barIndex, 
	bool hide
)

Parameters

view
Type: Autodesk.Revit.DBView
The view.
barIndex
Type: SystemInt32
The index of the bar from this set.
hide
Type: SystemBoolean
True to hide this bar in the view, false to unhide the bar.

Remarks

Individual bars of a rebar set can be hidden in a view only if the presentation mode is RebarPresentationMode.Select. If that is not the presentation mode assigned for this set in the view, this method will also change it.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException This rebar cannot have a presentation mode applied for view, as the view is not valid for rebar presentation, or the orientation of the view matches the normal direction of the rebar element.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException barIndex is not in the range [ 0, NumberOfBarPositions-1 ].
Autodesk.Revit.ExceptionsInapplicableDataException This rebar element represents a single bar (the layout rule is Single).

See Also