---
title: "getNumBoxNum"
canonical: "https://help.vicon.com/space/Shogun112/31234740/getNumBoxNum"
format: markdown
---
# Description

Gets the user num box number value.

Returns the number that appears in a num box user control that is specified by `userControlID`.

Num boxes are text boxes that restrict their input and output to numerical values. The number returned is a float, to accommodate both integer and floating point values. If [createNumBox](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31233078) was created with the `-flt` flag, then all values will be interpreted as floats. Otherwise, values will be rounded down to the nearest integer (i.e. any decimal value will be truncated).

## Functional area

User Window

# Command syntax

## Syntax

|  |
| --- |
| `getNumBoxNum userControlID` |

### Arguments

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

### Flags

None

## Return value

float 

> Macro (scroll-pagebreak)

## Examples

```plaintext
// Get the value of a Num Box User Control
int $windowId;
int $controlId;
float $val;
 
// First create a User Window to place the Control on
$windowId = `createWindow "MyWindow"`;
 
// Create the User Control on the Window. 
$controlId = `createNumBox $windowId -flt -num -10.75`;
 
// Get the value of the Num Box
$val = `getNumBoxNum $controlId`;
print $val;
```

# Additional information

## Related commands

- [createNumBox](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31233078)
- [setNumBoxHandler](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31230172)
- [setNumBoxNum](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31236661)