---
title: "getGlobalVectorVar"
canonical: "https://help.vicon.com/space/Shogun17/13536421/getGlobalVectorVar"
format: markdown
---
# Description

Retrieves the value of a specified string global variable.

Shogun Post's scripting language supports global variables that are accessible across scripts within a session of Shogun Post. This command retrieves the value of a specified global variable (identified by the name argument of the command) which stores a vector value. In Shogun Post, a vector is a fixed-size array of three double precision floating-point values used to store 3-dimensional data such as position and direction information.

## Functional area

Data retrieval

# Command syntax

## Syntax

|  |
| --- |
| `getGlobalVectorVar name` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `name` | string | yes | Name of the variable to retrieve |

### Flags

None

## Return value

vector

Returns the vector value stored in the specified global variable. 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Use the global myVar 
vector $localVar = <<1.0, 2.0, 3.0>>;
print($localVar);
if (`getGlobalVarExists myVar`)
{
   // Override local variable with global vector value 
   $localVar = `getGlobalFloatVar myVar`;
}
print($localVar);
```

# Additional information

## Related commands

- [delGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536479)
- [getGlobalBooleanVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536357)
- [getGlobalFloatVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536415)
- [getGlobalIntVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536413)
- [getGlobalStringVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536425)
- [getGlobalVarExists](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536423)
- [setGlobalVar](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13540573)