Live: get selection
live_get_selectionRetrieve the object IDs of the current selection in the live Inkscape instance to use with other tools.
Instructions
Read the current selection in the live instance as object ids (read-only).
When to use: getting the ids the user selected in the GUI. For their semantic detail use
live_inspect_selection; for the whole scene use live_get_scene. Not available over DBus
(no_freeze) — stays on the modal socket transport.
Key params: none. Requires an established session (live_connect).
Return shape: LiveSelection — count plus the selected object ids.
Example: live_get_selection()
Risk class: low (read-only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of selected objects. | |
| object_ids | No | Selected object ids. |