Sets the elements to be hidden in the view.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- elementIdSet
- Type: System.Collections.GenericICollectionElementId
A set of ElementIds to be hidden.
Remarks
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.
Also, elements cannot be hidden in Revit family documents (but they can be hidden temporarily using [M:Autodesk.Revit.DB.View.HideElementsTemporary(System.Collections.Generic.ICollection`1{Autodesk.Revit.DB.ElementId})]).
To hide a group completely, you must also include all members of all groups and nested groups in your input.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentNullException | Thrown when argument is a null reference (Nothing in Visual Basic). |
Autodesk.Revit.ExceptionsArgumentException | 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.ExceptionsInvalidOperationException | Thrown when document regeneration failed. |