Variable#

This module provides all functionalities for creating and editing design and project variables in the 3D tools.

from ansys.aedt.core import Hfss
app = Hfss(specified_version="2025.1",
             non_graphical=False, new_desktop_session=True,
             close_on_exit=True, student_version=False)

# This call returns the VariableManager class
variable_manager = self.aedtapp._variable_manager

# Set and get a variable
app["w"] = "10mm"
a = app["w"]
...

VariableManager

Manages design properties and project variables.

Variable

Stores design properties and project variables and provides operations to perform on them.

DataSet

Manages datasets.

CSVDataset

Reads in a CSV file and extracts data, which can be augmented with constant values.

Quantity and numbers#

Quantities with units can be managed using the class Quantity.

from ansys.aedt.core.generic.numbers import Quantity
a = Quantity(1, "GHz")
b = a + 1
c = a + "1MHz"
d = a + b
a.unit = "Hz"
e = a.to("MHz")
str(a)
float(a)
hfss = ansys.aedt.core.Hfss()
setup = hfss.create_setup()
setup.props["Freq"] = a

Quantity

Stores a number with its unit.