---
title: "setConstraint"
canonical: "https://help.vicon.com/space/Shogun16/13340140/setConstraint"
format: markdown
---
# Description

The setConstraint command sets the constraint offset for all selected nodes based on the position and rotation of the nodes at the current frame. Selected nodes may be constraints or sources of constraints.

Used often during fine tuning the setup of a skeleton to adjust the relationship between markers and bones.

## Functional area

Skeletal solving

# Command syntax

## Syntax

|  |
| --- |
| `setConstraint [-solvingOnly] [-labelingOnly] [-retargetingOnly]` |

### Arguments

None

### Flags

> Macro (scroll-tablelayout)

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `solvingOnly` |  |  |  |  |
| `labelingOnly` |  |  |  |  |
| `retargetingOnly` |  |  |  |  |

## Return value

void

## Examples

```plaintext
//With a marker selected, execute the setConstraint command to 
// update the constraint offset
setConstraint;
```

# Additional information

## Related commands

- [createSkelScript](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13339797)
- [snapToConstraint](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341712)
- [solve](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13341929)