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

Retrieves a float value from an object.

Because Shogun Post commands can only have one return type, there must be separate commands for retrieving different types of property data.

This command is used to retrieve channel or attributes values that are floating points (e.g. the Opacity attribute or TranslationX).

If `propertyName` represents a channel, the channel value at the current time is returned, unless the `-c` option is specified. It has the exact same functionality as the [getProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536619) command.

## Functional area

Data retrieval

# Command syntax

## Syntax

|  |
| --- |
| `getFloatProperty moduleName propertyName[-c] [-d]` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `propertyName` | string | yes | Name of the property on the object. |
| `moduleName` | string | yes | Object to retrieve property value from. |

> Macro (scroll-pagebreak)

### Flags

> Macro (scroll-tablelayout)

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `c` | 0 | — | — | Retrieves the property's const value. Only has an effect if `propertyName` represents a channel (i.e. can be animated). |
| `d` | 0 | — | — | — |

## Return value

float

## Examples

```plaintext
// Get some information about the "LFHD" marker.
float $opacity;
float $xTrans;
  
$opacity = `getFloatProperty "LFHD" "Opacity" `;
print $opacity;

$xTrans = `getFloatProperty "LFHD" "TranslationX"`;
print $xTrans;
```

# Additional information

## Related commands

- [getBooleanArrayProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536335)
- [getBooleanProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536333)
- [getIntArrayProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536419)
- [getIntProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536427)
- [getProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536619)
- [getStringProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536651)
- [getVectorProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537006)
- [setProperty](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537188)