Commands  ›   ›  Select By Filter

Select By Filter

writes to model Public API · not yet exposed

Coming soon

Before you run this

Document must contain at least one ParameterFilterElement. Active document and view must be open.

After it runs

Selection is replaced with elements that pass the filter rule set. Returns JSON with filterName, scope, totalSearched, totalSelected, and breakdown.

When to use this

Don't use this when

Creating or editing filters (manual Revit operation). Selecting by category alone (use SelectByCategoryCommand — faster). Deep parameter search across all fields (use SelectByParameterCommand).

Inputs

NameKindTypeRequiredDefaultDescription
filterName config string no Name of the ParameterFilterElement to use
scope config string no "view" view (default) or model

Returns

NameTypeDescription
SelectionElementId[]Selected IDs
SummaryJSONSelection summary with breakdown

Decision flow

check: parameters.filterName → required, fail if empty
check: resolve ParameterFilterElement by name → fail if not found (list available)
check: parameters.scope == "model" → search entire model
default: search current view only

What you'll see in the chat

on start
Selecting elements by view filter...
Looking for elements matching your filter rules...
Resolving filter and applying to selection...
thinking
Finding the named filter in the document...
Extracting filter categories and rules...
Testing elements against filter criteria...
Applying selection to model...
on success
Selected {totalSelected} elements matching filter "{filterName}" from {scope}
on failure
Filter selection failed: {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_filter
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

select by filter · select filter · select elements by view filter · filter selection by rule · view filter selection
Patterns: select * by filter · select * filter * · select elements * filter

Related commandsSelectByCategoryCommand · SelectByParameterCommand · FilterSelectionCommand
Pillar