Basic tutorial#

You can initiate AEDT in non-graphical mode from Python using this code:

# Launch AEDT 2023 R2 in non-graphical mode
import pyaedt
with pyaedt.Desktop(specified_version="2023.2", non_graphical=True, new_desktop_session=True, close_on_exit=True,
    circuit = pyaedt.Circuit()
    # Any error here is caught by AEDT.
# AEDT is automatically closed here.

The preceding code launches AEDT and initializes a new Circuit design.

AEDT launched

This code creates a project and saves it with PyAEDT:

# Launch the latest installed version of AEDT in graphical mode.
import pyaedt
cir =  pyaedt.Circuit(non_graphical=False)
cir.release_desktop(save_project=True, close_desktop=True)
# Desktop is released here.

This code uses PyAEDT to access the Ansys EDB proprietary layout format:

# Launch the latest installed version of EDB.
import pyaedt
edb = pyaedt.Edb("mylayout.aedb")

# User can launch EDB directly from the PyEDB class.

import pyedb
edb = pyedb.Edb("mylayout.aedb")