Commands › › Select In Canvas
Select In Canvas
Coming soon
Before you run this
Active document must be open with a valid active view (floor plan, ceiling plan, or section).
After it runs
Revit selection is replaced with elements visible in the canvas viewport. Returns JSON with totalSelected and breakdown.
When to use this
- User is zoomed into a corridor and says "select all lights here".
- User wants to act on only the visible portion of a large floor plan.
- User wants to select elements "on screen" not the whole view.
Don't use this when
Selecting across entire view (use SelectByCategoryCommand with view scope). Selecting across entire model (use SelectByCategoryCommand with allViews=true).
Inputs
| Name | Kind | Type | Required | Default | Description |
|---|---|---|---|---|---|
category |
config | string |
no | — | Optional category filter |
Returns
| Name | Type | Description |
|---|---|---|
Selection | ElementId[] | Selected element IDs |
Summary | JSON | Breakdown and bounds info |
Decision flow
check: view.CropBoxActive → use crop box bounds
fallback: use UIView.GetZoomCorners() for actual viewport bounds
filter: optional category parameter to narrow results
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_in_canvas- Request body schema (from
[RestApiParam]) - Response schema (from
[RestApiResponse]) - curl / JS / Python code examples
Keywords & intent patterns
select on screen · select visible · select in canvas · select zoomed · select what I see
Patterns: select * visible * · select * on screen * · select * here · select * zoomed
Related
| Related commands | SelectByCategoryCommand · SelectByFamilyNameCommand · FilterSelectionCommand |
|---|---|
| Pillar |