Commands  ›   ›  Select By Category

Select By Category

writes to model Public API · not yet exposed

Coming soon

Before you run this

Active document must be open with a valid active view.

After it runs

Revit selection is replaced with all elements matching the category. Returns JSON with totalSelected and breakdown by family.

When to use this

Don't use this when

Selecting by family name (use SelectByFamilyNameCommand). Selecting by parameter value (use SelectByParameterCommand). Filtering an existing selection (use FilterSelectionCommand).

Inputs

NameKindTypeRequiredDefaultDescription
category config string no Revit category name
allViews config bool no false Search entire model instead of current view

Returns

NameTypeDescription
SelectionElementId[]Selected element IDs
SummaryJSONBreakdown by family name and count

Decision flow

check: parameters.category → resolve category name to BuiltInCategory
check: parameters.allViews == "true" → search entire model
default: search current view only

What you'll see in the chat

on start
Selecting elements by category...
Finding all elements in the category...
thinking
Resolving category name...
Collecting elements from {scope}...
Setting Revit selection...
on success
Selected {totalSelected} elements in category {category}.
on failure
Could not select by category: {error}

REST API

Not yet exposed

This command does not carry a [RestApi] attribute today. Once tagged, this section will auto-populate with:

  • POST /api/v1/commands/select_by_category
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

select by category · select all · select lights · select pipes · select elements · pick category
Patterns: select * category · select all * · pick all *

Related commandsSelectByFamilyNameCommand · SelectByParameterCommand · FilterSelectionCommand · TagAllCommand
Pillar