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

Gets the time value of the time box user control specified by `userControlID`.

The return value is in frames, regardless of the time display style setting in the Preferences.

## Functional area

User Window

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getTimeBoxTime userControlID` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `userControlId` | int | yes | ID of user control to operate on. |

### Flags

None

## Return value

integer

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Get the time value of a Time Box User Control
int $windowId;
int $controlId;
int $time;
 
// First create a User Window to place the Controls on
$windowId = `createWindow "MyWindow"`;
 
// Create the User Control on the Window.
$controlId = `createTimeBox $windowId`;
 
// Set the time to some arbitrary frame
setTimeBoxTime $controlId 125;
 
// Get the time we just set
$time = `getTimeBoxTime $controlId`;
print $time;
```

# Additional information

## Related commands

- [createTimeBox](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253740424)
- [setTimeBoxHandler](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736994)
- [setTimeBoxTime](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738319)