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

Selects the entire tree that each specified module belongs to.

Use selectTree to add or subtract from your selections based upon hierarchical relationships in the scene. You may pass individual nodes, or arrays of nodes to the selectTree command.

## Functional area

Selection

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `selectTree node1 node2 ...[-a] [-r]` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `node(s)` | string | yes | Name of node(s) in the scene to operate on. |

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `a` | 0 | — | r | Adds to the current selection in the scene |
| `r` | 0 | — | a | Removes from the current selection in the scene |

## Return value

void

> Macro (16dcb1b2-c6fb-4c23-a096-38455b87e6a8/1fa5e51a-a28e-46e1-9b5c-734b339f025f/static/scroll-pagebreak)

## Examples

```plaintext
// This command adds to the current selection all the 
// members of the hierarchy to which the node lcollar belongs.
selectTree -a lcollar;
```

# Additional information

## Related commands

- [select](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737508)
- [selectabilityOn](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737978)
- [selectBranch](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737247)
- [selectByName](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253739192)
- [selectByPart](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736482)
- [selectBySide](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738001)
- [selectByType](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737710)
- [selectChildren](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738333)
- [selectParent](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737538)
- [selectSet](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737834)
- [setPrimary](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736466)