Commands  ›   ›  Select By Ids

Select By Ids

writes to model Public API · not yet exposed

Coming soon

Before you run this

Active document; elementIds = JSON array [1,2,3] or comma-separated numbers.

After it runs

Selection is set to valid IDs; result returns success and count.

When to use this

Don't use this when

Selecting by category/family/room — use SelectByRoomCommand or other selection commands first, then this with their IDs.

Inputs

NameKindTypeRequiredDefaultDescription
elementIds config string no JSON array of IDs [1,2,3] or comma-separated numbers

Returns

NameTypeDescription
successboolWhether selection was set
countintNumber of elements selected

What you'll see in the chat

on start
Setting selection to the specified element IDs...
Selecting elements by ID...
thinking
Parsing element IDs from input...
Validating IDs against the model...
Setting Revit selection...
on success
Selected {count} element(s) by ID.
on failure
Could not select elements: {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_ids
  • Request body schema (from [RestApiParam])
  • Response schema (from [RestApiResponse])
  • curl / JS / Python code examples

Keywords & intent patterns

select by id · select by ids · set selection · element ids

Related commandsSelectByLocationCommand · SelectByRoomCommand
Pillar