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

Use setPosition to set the translation of a module in relative or world space coordinates.

setPosition modifies the keys of the current frame. If no animation data exists when setPosition is run, it creates a key.

## Functional area

Data manipulators

# Command syntax

## Syntax

|  |
| --- |
| `setPosition "moduleName" posVec [-ws] [-preTrans] [-default]` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `posVec` |  |  | The vector data to apply |
| `moduleName` |  |  | Name of the module you want to modify |

### Flags

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `ws` | 0 | — | — | PosVector data is applied in world space coordinates |
| `preTrans` | 0 | — | default | — |
| `default` | 0 | — | preTrans | — |

## Return value

void 

> Macro (scroll-pagebreak)

## Examples

```plaintext
//Create a marker and set its position
create Marker "marker1"; 
setPosition marker1 <<100, 0, 0>>;
```

# Additional information

## Related commands

- [setKey](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340026)
- [setRotation](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340236)
- [setScale](https://vicon-help.atlassian.net/wiki/spaces/Shogun16/pages/13340107)