Value#
- class ansys.edb.core.utility.value.Value(val, _owner=None)#
 Represents a number or an expression.
- Attributes:
 
Notes
A value can be either a constant (such as
1,2.35,"7+0.3i", and"23mm") or parametric (such as.``w1 + w2``).If the value is parametric, the
_ownerattribute must be set to the object that hosts the variables used. If the owner isCellorLayout, the expression can reference both database variables and cell variables. A better way to create a parametric values is to call theobj_with_variables.create_value(str)method, which automatically sets the_ownerparameter to the correct object.Values can be used in expressions with the following operators:
Mathematical operators supported by values# Operator
Operation
Return Value
+
addition
Value
-
subtraction or negation
Value
*
multiplication
Value
/
division
Value
//
floor division
integer
**
power
Value
==
equality
bool
<
less than
bool
>
greater than
bool
The value is evaluated to a constant (if it is parametric) before applying the operators.
Methods
Value.equals(other[, tolerance])Check if this value and other value are equivalent when evaluated.
Attributes
complex: Complex value from the value object.float: Float from the value object.bool: Flag indicating if the the value is a complex number (has a non-zero imaginary part).bool: Flag indicating if the value is parametric (dependent on variables).float: Square root of this value as a constant value.complex: Evaluation to a constant and return as a float or complex.