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

Sets the time value of the time box user control that is specified by `userControlID`. The time value should be specified in frames.

## Functional area

User Window

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `setTimeBoxTime userControlID frame` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `timeVal` | int | yes | Time value, in frames. |
| `userControlId` | int | yes | ID of user control to operate on. |

### Flags

None

## Return value

void

> 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)
- [getTimeBoxTime](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738549)
- [setTimeBoxHandler](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736994)