Set Selection
set_selectionUse this when you need to replace the shared local Studio face/edge selection, or clear it with selection:null. The viewer highlights the pick on its next sync (300 ms). Does not edit geometry. Pass model_generation from get_selection; writes from an older generation are rejected. Use only current shape indices. Requires a local Studio session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | Yes | Studio sessionToken from GET /__kernelcad/session?script=<path>. Use the same script as the viewer. | |
| selection | Yes | ||
| studio_url | Yes | Local Studio HTTP origin, e.g. http://localhost:5173. | |
| model_generation | Yes | modelGeneration from get_selection; rejects picks from a prior mesh. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||