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

Returns an array of integer pairs indicating the current group of selected time ranges.

Use getSelectedTimeRanges when you need to know the details regarding the current in/out time selections in your scene.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getSelectedTimeRanges [-noFeedback]` |

### Arguments

None

### Flags

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `noFeedback` | 0 | — | — | — |

## Return value

integer array

Returns an array of integer pairs indicating the current group of selected time ranges. 

> Macro (scroll-pagebreak)

## Examples

```plaintext
int $fSTR[]; 
$fSTR =`getSelectedTimeRanges`;
int $i;
int $j = 1;
print "Ranges:";
for( $i = 0; 
 $i < (getCount($fSTR)); 
 $i += 2 )
 {
    print $j;
    $j += 1;        
    print( "in frame " + string ($fSTR [$i] ));
    print( "out frame " + string($fSTR [$i + 1]));
    print " ";
 }
// Print a list representing the set of currently selected 
// time ranges. The list will consist of integers, two
// elements for each selected time range found.
```

# Additional information

## Related commands

- [findBadData](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737116)
- [findSelectedKeys](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738574)