Commands › › Select By Category
Select By Category
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
- User wants to select all lighting fixtures to tag them.
- User wants to count how many pipes are in the current view.
- User wants to pre-select elements before running TagAllCommand.
Don't use this when
Selecting by family name (use SelectByFamilyNameCommand). Selecting by parameter value (use SelectByParameterCommand). Filtering an existing selection (use FilterSelectionCommand).
Inputs
| Name | Kind | Type | Required | Default | Description |
|---|---|---|---|---|---|
category |
config | string |
no | — | Revit category name |
allViews |
config | bool |
no | false | Search entire model instead of current view |
Returns
| Name | Type | Description |
|---|---|---|
Selection | ElementId[] | Selected element IDs |
Summary | JSON | Breakdown 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...
Finding all elements in the category...
thinking
Resolving category name...
Collecting elements from {scope}...
Setting Revit selection...
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
| Related commands | SelectByFamilyNameCommand · SelectByParameterCommand · FilterSelectionCommand · TagAllCommand |
|---|---|
| Pillar |