GetCategoryHidden Method


Checks if elements of the given category are set to be invisible (hidden) in this view.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since: 2017

Syntax

C#
public bool GetCategoryHidden(
	ElementId categoryId
)
Visual Basic
Public Function GetCategoryHidden ( _
	categoryId As ElementId _
) As Boolean
Visual C++
public:
bool GetCategoryHidden(
	ElementId^ categoryId
)

Parameters

categoryId
Type: Autodesk.Revit.DB ElementId
The ID of the category.

Return Value

True if the category is invisible (hidden), false otherwise.

Remarks

This checks 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.
Thus the return value may not reflect the actual visibility of elements of this category in the view.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException categoryId does not correspond to a Category.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also