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

Retrieves an array of all the gap ranges on a node. Each gap takes up two elements in the array, for the start and end frame of the gap. Thus, the array size is twice the number of gaps on the node.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getGaps node [-any] [-rot] [-sort] [-ranges] [-maxWidth integer] [-noFeedback]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `node` | string | yes | Name of node to get gap ranges for. |

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `any` | 0 | — | — | Specifies that a gap can exist on any of the sub channels. The default is that the gap must exist on all sub channels. |
| `rot` | 0 | — | — | Specifies that the rotation channel be searched for gaps. The default is to search on the translation channel. |
| `sort` | 0 | — | — | Specifies that the gap ranges be sorted in ascending order of gap size. The default is to leave the gap ranges in chronological order. |
| `ranges` | 0 |  |  | Specifies one or more selected time ranges within which the operation returns gaps. |
| `maxWidth` | 1 | integer |  | Use to specify a maximum size, under which the operation returns gaps. Takes an int argument of maximum gap length. |
| `noFeedback` | 0 | — | — | — |

## Return value

integer array

## Examples

```plaintext
// Get all the gaps on the RFWT.
int $gaps[]; 
int $i, $count;
 
// Get all the gaps.
$gaps = `getGaps "RFWT"`;
 
// Print out their sizes.
$count = `getCount $gaps`;
for( $i = 0; 
 $i < $count; 
 $i += 2 )
{ 
   print int( $gaps[$i+1] - $gaps[$i] + 1 );
}
```

# Additional information

## Related commands

- [fillGaps](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738229)
- [findGap](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736657)