HideElements Method

Sets the elements to be hidden in the view.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)


public void HideElements(
	ICollection<ElementId> elementIdSet
Visual Basic
Public Sub HideElements ( _
	elementIdSet As ICollection(Of ElementId) _
Visual C++
void HideElements(
	ICollection<ElementId^>^ elementIdSet


Type: System.Collections.Generic ICollection ElementId
A set of ElementIds to be hidden.


This change is permanent until the elements are unhidden. All elements in the set must be currently unhidden and must be allowed to be hidden. An application can check this with IsHidden(View) and CanBeHidden(View) .

Some elements cannot be hidden directly. Examples include: group, array, constraint, edit cut profile, face splitter and link to external documents.


Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when argument is a null reference ( Nothing in Visual Basic) .
Autodesk.Revit.Exceptions ArgumentException Thrown when the set of elements to be hidden is empty or one of the elements can not be hidden. Also thrown when the set of elements to be hidden includes the view itself.
Autodesk.Revit.Exceptions InvalidOperationException Thrown when document regeneration failed.

See Also