---
title: "selectRange"
canonical: "https://help.vicon.com/space/ShogunPost121/1253736590/selectRange"
format: markdown
---
# Description

Selects a subset, or several subsets, of the current playRange. No arguments deselects all time.

Use the selectRange commands to control your time range selections with a high degree of flexibility.

The `-keys` option may be used to make range selections based upon currently selected keys.

The `-setIn` and `-setOut` commands enable you to work in the Perspective view and make range selections without having to open the Graph view, or declare frames with numeric arguments.

## Functional area

Selection

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `selectRange startTime endTime[-all] [-a] [-r] [-invert] [-keys] [-setIn] [-setOut]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `endTime` | integer | no | The last frame of the range to select. |
| `beginTime` | integer | no | The first frame of the range to select. |

> Macro (scroll-pagebreak)

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `all` | 0 | — | a, r, invert, keys, setIn, setOut | Select all time |
| `a` | 0 | — | all, r, invert, setIn, setOut | Add to current time selection |
| `r` | 0 | — | all, a, invert, setIn, setOut | Remove from current time selection |
| `invert` | 0 | — | all, a, r, keys, setIn, setOut | Invert current time selection |
| `keys` | 0 | — | all, invert, setIn, setOut | Select time ranges of all currently selected keys on selected modules. |
| `setIn` | 0 | — | all, a, r, invert, keys, setOut | Sets the current frame as one end of a range. Should be followed by a `-setOut` |
| `setOut` | 0 | — | all, a, r, invert, keys, setIn | Sets the current frame as the other end of a range. Follows a `-setIn.` |

## Return value

void

## Examples

```plaintext
// Select a range of the playRange beginning at frame 
// 240 and ending at 285;
selectRange 240 285;
```

> Macro (scroll-pagebreak)

# Additional information

## Related commands

- [select](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737508)
- [selectKeys](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737266)
- [selectProperty](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738322)