VariableState#

class VariableState(value: ansys.tools.variableinterop.variable_value.IVariableValue, is_valid: bool)#

Bundles a variable value with a validity flag.

Overview#

clone

Clone the instance.

value

Get the variable value.

is_valid

Flag indicating that the object is equal to the other object.

safe_value

Variable value.

__eq__

Check if this object is equal to another object.

Import detail#

from ansys.tools.variableinterop.variable_state import VariableState

Property detail#

property VariableState.value: IVariableValue#

Get the variable value.

property VariableState.is_valid: bool#

Flag indicating that the object is equal to the other object.

True indicates that the objects are equal.

property VariableState.safe_value: IVariableValue#

Variable value.

VariableValueInvalidError is raised if the variable value is not valid.

Method detail#

VariableState.__eq__(other) bool#

Check if this object is equal to another object.

Parameters:
otherAny

Other object to compare.

Returns:
bool

True if the objects are equal, False otherwise.

VariableState.clone() VariableState#

Clone the instance.

The returned instance contains a clone of this instance’s value.

Returns:
VariableState

Deep copy of the instance.