NamedVariable#
- class ansys.aedt.core.modeler.advanced_cad.stackup_3d.NamedVariable(application, name, expression)#
Cast PyAEDT variable object to simplify getters and setters in Stackup3D.
- Parameters:
- application
ansys.aedt.core.hfss.Hfss
HFSS design or project where the variable is to be created.
- name
str
The name of the variable. If the name begins with an ‘$’, the variable will be a project variable. Otherwise, it will be a design variable.
- expression
str
Expression of the value.
- application
Examples
>>> from ansys.aedt.core import Hfss >>> from ansys.aedt.core.modeler.advanced_cad.stackup_3d import NamedVariable >>> hfss = Hfss() >>> my_frequency = NamedVariable(hfss, "my_frequency", "900000Hz") >>> wave_length_formula = "c0/" + my_frequency.name >>> my_wave_length = NamedVariable(hfss, "my_wave_length", wave_length_formula) >>> my_permittivity = NamedVariable(hfss, "my_permittivity", "2.2") >>> my_wave_length.expression = my_wave_length.expression + "/" + my_permittivity.name
Methods
NamedVariable.hide_variable
([value])Set the variable to a hidden variable.
NamedVariable.read_only_variable
([value])Set the variable to a read-only variable.
Attributes
String that combines the numeric value and the units.
Expression of the variable as a string.
Name of the variable as a string.
Numeric part of the expression as a float value.
Unit system of the expression as a string.
Units.
Value.