Selection

deselectAll

deselectAll()

Deselects all objects in the whole document.

getSelectedObject

getSelectedObject([nr]) -> string

Returns the name of the selected object. "nr" if given indicates the number of the selected object, e.g. 0 means the first selected object, 1 means the second selected Object and so on.

moveSelectionToBack

moveSelectionToBack()

Moves current selection to back.

moveSelectionToFront

moveSelectionToFront()

Moves current selection to front.

selectObject

selectObject("name")

Adds the object with the given "name" to the current selection.

Lots of scripter function use the concept of "currently selected item" if an object name is not provided. In the case of multiple selections, the currently selected item is always the first item in the selection. As a consequence if you are planning to use object "name" as the currently selected item for following operations and current selection is not empty, you will have to call deselectAll() before calling this function.

selectionCount

selectionCount() -> integer

Returns the number of selected objects.