IsAnyOfCategories

bool IsAnyOfCategories(this Element element, params BuiltInCategory[] categories)

True if the element's category matches any of the provided BuiltInCategory values.

Parameters

  • elementElement

    The element instance.

  • categoriesBuiltInCategory[]

    Categories to check.

Returns: True if any match; otherwise false.

Example

bool ok = element.IsAnyOfCategories(BuiltInCategory.OST_Walls, BuiltInCategory.OST_Floors);