---
title: "selectParent"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737538/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

> Macro (scroll-tablelayout)

|  |
| --- |
| `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

> 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 |
| `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/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)
- [selectSet](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737834)
- [selectTree](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736558)
- [setPrimary](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736466)