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

Automatically attaches markers to bones based on distance.

Assumes a skeleton is posed in a marker cloud. Creates a constraint for each marker and sets that constraint to act on the closest bone to the marker in the scene.

Can be used to automate skeleton setup, but resulting constraints should be reviewed as the closest bone may not be the bone you want a marker to constrain.

## Functional area

Skeletal solving

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `skelSetup` |

### Arguments

None

### Flags

None

## Return value

void

## Examples

```plaintext
//Run this with a skeleton posed in a marker cloud and no 
//existing constraints.
skelSetup;
```

> Macro (scroll-pagebreak)

# Additional information

## Related commands

- [attach](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736625)
- [setConstraint](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737004)
- [solve](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736571)