Sets if elements of the given category will be visible in this view.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2017
Syntax
C# |
---|
public void SetCategoryHidden( ElementId categoryId, bool hide ) |
Visual Basic |
---|
Public Sub SetCategoryHidden ( _ categoryId As ElementId, _ hide As Boolean _ ) |
Visual C++ |
---|
public: void SetCategoryHidden( ElementId^ categoryId, bool hide ) |
Parameters
- categoryId
- Type: Autodesk.Revit.DB..::..ElementId
The ID of the category.
- hide
- Type: System..::..Boolean
True to make elements of this category invisible, false to make them visible.
Remarks
This affects only if the category is set visible or invisible individually. Other Revit mechanisms
may also affect the visibility of elements of this category, including:
- The category classes settings for model categories, annotation categories, import categories or analytical model categories.
- View filters.
- Elements hidden individually in the view.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | categoryId does not correspond to a Category. -or- Category cannot be hidden. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |