GetElementsByCategory

IEnumerable<Element> GetElementsByCategory(this RevitLinkInstance link, BuiltInCategory category)

Gets elements by category from the linked document (instances only).

Parameters

  • linkRevitLinkInstance

    The link instance.

  • categoryBuiltInCategory

    The category to collect.

Returns: Elements from the linked document (empty if link not loaded).

Example

var walls = link.GetElementsByCategory(BuiltInCategory.OST_Walls);