ValueCommandInput.value Property

Parent Object: ValueCommandInput
Defined in namespace "adsk::core" and the header file is <Core/UserInterface/ValueCommandInput.h>

Description

Gets or sets the value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box. When getting the value, the current expression string is evaluated and the database value for the unit type is returned.

The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Syntax

"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.value

# Set the value of the property.
valueCommandInput_var.value = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
double propertyValue = valueCommandInput_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = valueCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014