Variable#
- class ansys.aedt.core.application.variables.Variable(expression, units=None, si_value=None, full_variables=None, name=None, app=None, readonly=False, hidden=False, sweep=True, description=None, postprocessing=False, circuit_parameter=True)[source]#
Stores design properties and project variables and provides operations to perform on them.
- Parameters:
Examples
>>> from ansys.aedt.core.application.variables import Variable
Define a variable using a string value consistent with the AEDT properties.
>>> v = Variable("45mm")
Define an unitless variable with a value of 3.0.
>>> v = Variable(3.0)
Define a variable defined by a numeric result and a unit string.
>>> v = Variable(3.0 * 4.5, units="mm") >>> assert v.numeric_value = 13.5 >>> assert v.units = "mm"
Methods
Decompose a variable value to a floating with its unit.
Variable.format
(format)Retrieve the string value with the specified numerical formatting.
Variable.rescale_to
(units)Rescale the expression to a new unit within the current unit system.
Attributes
Circuit parameter flag value.
Description value.
String value.
Expression.
Hidden flag value.
"Check if optimization is enabled.
Check if Sensitivity is enabled.
Check if statistical is enabled.
Check if tuning is enabled.
Variable name.
Numeric part of the expression as a float value.
"Optimization max value.
"Optimization min value.
Postprocessing flag value.
Read-only flag value.
"Sensitivity initial value.
"Sensitivity max value.
"Sensitivity min value.
Sweep flag value.
"Tuning max value.
"Tuning min value.
"Tuning Step value.
Unit system of the expression as a string.
Units.
Value.