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

Gets the constraint error. This method returns the error of the given constraint at the current time as determined by the difference between the constraining node's position and its offset. Value is in millimeters.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getConstraintError "SolvingConstraint or LabelingConstraint name"` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `SolvingConstraint` or  
`LabelingConstraint name` | string | yes | The constraint whose error is to be retrieved. |

### Flags

None

## Return value

float

Returns the error of the given constraint at the current time.

## Examples

```plaintext
// Will get the constraint error for the LFHD_Head Constraint.
float $err;
$err = `getConstraintError "LFHD_Head"`;
print $err;
```