---
title: "selectParent"
canonical: "https://help.vicon.com/space/Shogun19/13796516/selectParent"
format: markdown
---
# Description

Selects the immediate parent of each named node

Use selectParent when you need to add or remove the parents of the nodes specified to/from your current selection.

## Functional area

Selection

# Command syntax

## Syntax

|  |
| --- |
| `selectParent node1 node2 ...[-a] [-r] [-recursive]` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `node1` | string | yes | Name of module in the scene to operate on |
| `node2` | string | no | Additional modules can specified |

### Flags

| **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 |
| `recursive` | 0 | — | — | Selects all parents of the nodes indicated. |

## Return value

void

## Examples

```plaintext
// This command will select the indicated nodes and their
// immediate parents.
selectParent -r lcollar rcollar;
```

# Additional information

## Related commands

- [select](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796482)
- [selectabilityOn](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796484)
- [selectBranch](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796486)
- [selectByName](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796490)
- [selectByPart](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796494)
- [selectBySide](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796496)
- [selectByType](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796498)
- [selectChildren](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796500)
- [selectSet](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796524)
- [selectTree](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796532)
- [setPrimary](https://vicon-help.atlassian.net/wiki/spaces/Shogun19/pages/13796636)