IsOfCategory

bool IsOfCategory(this Element element, BuiltInCategory bic)

True if the element's category matches the given BuiltInCategory. Returns false if unmapped/unavailable.

Parameters

  • elementElement

    The element instance.

  • bicBuiltInCategory

    The built-in category to compare.

Returns: True if matches; otherwise false.

Example

bool isWall = element.IsOfCategory(BuiltInCategory.OST_Walls);