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

Sets the play range to include the frame range specified.

Use this command in the **Script Editor** to set the playRange of your scene to a subset of the current range.

playRange is very useful for trimming the working range of your animation file without losing any of the data. When you reset a playRange, the data that lies outside of the new range will still remain in the file if saved as a .*vdf*. Upon export to another format, only the playRange is exported.

The playRange command is not undoable.

SMPTE times must be surrounded by quotes

## Functional area

Playback control

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `playRange inTime outTime[-r] [-start] [-end] [-save] [-restore]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `inTime` |  | yes | Start frame integer , required unless -end option is specified |
| `outTime` |  | yes | End frame integer, required unless the -start option is specified |

> Macro (scroll-pagebreak)

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `r` | 0 | — | — | Set range relative to start/end of current play range |
| `start` | 0 | — | end | Sets the playRange start to the current frame |
| `end` | 0 | — | start | Sets the playRange end to the current frame |
| `save` | 0 | — | restore | Save current play range before applying play range changes. Can be restored by next `playRange -restore` call. |
| `restore` | 0 | — | save | Restore the last saved play range before applying play range changes. |

## Return value

void

## Examples

```plaintext
playRange -save;
playRange 340 345;
playRange -restore;
// This sequence of commands saves the current play range, 
// then sets it to a new range; enabling you to restore
// the original range at any time.
  
// set start of play Range to 50
playRange -start 50;

// set end of play Range to 200
playRange -end 200;
```

> Macro (scroll-pagebreak)

# Additional information

## Related commands

- [animRange](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737864)
- [fastForward](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736984)
- [getAnimEnd](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738102)
- [getPlayEnd](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738077)
- [getPlayStart](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737434)
- [getTime](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736823)
- [play](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737029)
- [playOptions](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736691)
- [setRangesFollowActiveClip](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736779)
- [setTime](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737046)
- [step](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737636)
- [stepKey](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737885)
- [stop](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737596)