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

Retrieves the list of selected/active channels as an array of channel names.

Some commands require channel names as arguments, and using this command to get the selected channels always ensures that the channels you have selected get operated on, rather than having to hard code the channel names.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getChannels` |

### Arguments

None

### Flags

None

## Return value

string array

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Set and get active Channels
string  $channels[];
 
// First select some channels
selectProperty TranslationX; 
selectProperty TranslationY -a;
selectProperty TranslationZ -a;
 
// Print out the channel names we just selected
$channels = `getChannels`;
print $channels;
```

# Additional information

## Related commands

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