# editor.range.set

Source: https://docs.lightair.app/developers/remote-api/editor.range.set

> Sets the in and out marks of the canvas shown.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Editor. Script plugins need the `project.write` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `canvas` | `string` | no | A canvas's id or name, shown first. Default: the canvas shown. |
| `in_ms` | `number` | no | The in mark. Kept as it is when not given. |
| `out_ms` | `number` | no | The out mark. Kept as it is when not given. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `in_ms` | `number` | no | The in mark. |
| `out_ms` | `number | null` | no | The out mark; null for the end. |

## Errors

Invalid params (-32602) without either, or with the out mark before the in mark. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it.

## Events

- `editor.changed`

## From an AI agent

The MCP server's `editor_canvases (action: range)` reaches this method.

## Related

- [editor.range.clear](https://docs.lightair.app/developers/remote-api/editor.range.clear.md)
- [editor.export.start](https://docs.lightair.app/developers/remote-api/editor.export.start.md)
