View.SetCategoryHidden
Description:
Sets if elements of the given category will be visible in this view.
Sets if elements of the given category will be visible in this view.
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:
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.
public void SetCategoryHidden(
ElementId categoryId,
bool hide
)
-
categoryIdThe ID of the category.
-
BooleanhideTrue to make elements of this category invisible, false to make them visible.
-
categoryId does not correspond to a Category. -or- Category cannot be hidden.
-
A non-optional argument was null