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

On the selected markers, selectDistanceViolations determines marker pairs which would have an expected consistent distance based on being constrained to the same labeling bone or adjacent bones. With those pairs, it uses the distance relationship in the base pose to determine an expected distance. It then checks the distance between markers at every frame and scores if expected distance is violated. Keys of markers which violate the expected distance are selected.

You can then use this selection for cleaning markerless data.

## Functional area

Data Retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `selectDistanceViolations tolerance[-ranges]  ` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `tolerance` |  | yes | Allowed distance deviation tolerance as a percentage of the expected distance |

### Flags

> Macro (scroll-tablelayout)

| Name | Flag arguments | Argument type | Exclusive to | Comments |
| --- | --- | --- | --- | --- |
| `ranges` |  | — | — | By default this command operates on the entire play range. When this flag is present, the command operates on only the selected time ranges. |

## Return value

void

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Select and remove keys of markers which violate 
// the expected distance.
selectByType Marker;
selectByType Marker -childOf Unlabeled_Markers -r;
selectDistanceViolations 60;
cutKeys;
```