Download this example
Download this example as a Jupyter Notebook or as a Python script.
EDB: Importing GDS file#
This example demonstrates how to import GDS files and translate their information to an EDB file.
Perform imports.
[1]:
import os
import tempfile
from pyedb.dotnet.edb import Edb
from pyedb.misc.downloads import download_file
from ansys.aedt.core.hfss3dlayout import Hfss3dLayout
Case 1: Import a GDS file.#
Download the test case folder and copy it to a temporary folder. The following files are used in this example:
XML_Automation.xml defines physical information such as material properties, stackup layers, and boundary conditions.
Model.map maps properties to stackup layers.
[2]:
temp_dir = tempfile.TemporaryDirectory(suffix=".ansys")
control_fn = "Model.xml"
gds_fn = "Model.gds"
layer_map = "Model.map"
local_path = download_file("gds", destination=temp_dir.name)
my_control_file = os.path.join(local_path, control_fn)
my_map_file = os.path.join(local_path, layer_map)
gds_in = os.path.join(local_path, gds_fn)
Open EDB#
Import the gds and open the edb. Each gds is followed either by a control file (XML) or a technology file (IRCX, VLC.TECH, or ITF). Then a MAP file is also regularly used to map the stackup layers, and finally in some cases a layer filter (XML) is deployed, when only a part of the stackup is needed.
[3]:
# Select EDB version (change it manually if needed, e.g. "2025.1")
version = "2025.1"
print(f"EDB version: {version}")
edb = Edb(gds_in, edbversion=version, control_file=my_control_file, map_file=my_map_file)
# ## Plot stackup
edb.stackup.plot()
# ## Save and close EDB
#
# Save the project.
edb1_path = os.path.join(temp_dir.name, "gds_design.aedb")
edb.save_as(edb1_path)
# Close the project.
edb.close_edb()
# ## Open both EDB files with HFSS 3D Layout, and observe the design / confirm the robustness from GDS to EDB.
h3d_gds = Hfss3dLayout(project=edb1_path, version=version, new_desktop=True)
# ## Close the HFSS 3D Layout design and release the dekstop.
h3d_gds.release_desktop()
# Clean up the temporary folder.
temp_dir.cleanup()
EDB version: 2025.1
PyEDB INFO: StdOut is enabled
PyAEDT INFO: StdOut is enabled
PyEDB INFO: Logger is initialized in EDB.
PyAEDT INFO: Logger is initialized in EDB.
PyEDB INFO: legacy v0.50.0
PyAEDT INFO: legacy v0.50.0
PyEDB INFO: Python version 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
PyAEDT INFO: Python version 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
PyEDB INFO: Translation correctly completed
PyAEDT INFO: Translation correctly completed
PyEDB INFO: Database Model.aedb Opened in 2025.1
PyAEDT INFO: Database Model.aedb Opened in 2025.1
PyEDB INFO: Cell IC_Wo_Component1 Opened
PyAEDT INFO: Cell IC_Wo_Component1 Opened
PyEDB INFO: Builder was initialized.
PyAEDT INFO: Builder was initialized.
PyEDB INFO: EDB C:\Users\ansys\AppData\Local\Temp\tmp_efatxvq.ansys\gds\Model.aedb was created correctly from ds file.
PyAEDT INFO: EDB C:\Users\ansys\AppData\Local\Temp\tmp_efatxvq.ansys\gds\Model.aedb was created correctly from ds file.
PyEDB INFO: EDB initialized.
PyAEDT INFO: EDB initialized.

PyEDB INFO: EDB file save time: 0.00ms
PyAEDT INFO: EDB file save time: 0.00ms
PyEDB INFO: EDB file release time: 0.00ms
PyAEDT INFO: EDB file release time: 0.00ms
PyEDB INFO: Python version 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)].
PyAEDT INFO: Python version 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)].
PyEDB INFO: PyAEDT version 0.18.dev0.
PyAEDT INFO: PyAEDT version 0.18.dev0.
PyEDB INFO: Initializing new Desktop session.
PyAEDT INFO: Initializing new Desktop session.
PyEDB INFO: Log on console is enabled.
PyAEDT INFO: Log on console is enabled.
PyEDB INFO: Log on file C:\Users\ansys\AppData\Local\Temp\pyaedt_ansys_dcfe5909-6b47-4aad-a3e3-7859fe805723.log is enabled.
PyAEDT INFO: Log on file C:\Users\ansys\AppData\Local\Temp\pyaedt_ansys_dcfe5909-6b47-4aad-a3e3-7859fe805723.log is enabled.
PyEDB INFO: Log on AEDT is disabled.
PyAEDT INFO: Log on AEDT is disabled.
PyEDB INFO: Debug logger is disabled. PyAEDT methods will not be logged.
PyAEDT INFO: Debug logger is disabled. PyAEDT methods will not be logged.
PyEDB INFO: Launching PyAEDT with gRPC plugin.
PyAEDT INFO: Launching PyAEDT with gRPC plugin.
PyEDB INFO: New AEDT session is starting on gRPC port 64592.
PyAEDT INFO: New AEDT session is starting on gRPC port 64592.
PyEDB INFO: Electronics Desktop started on gRPC port: 64592 after 28.890328407287598 seconds.
PyAEDT INFO: Electronics Desktop started on gRPC port: 64592 after 28.890328407287598 seconds.
PyEDB INFO: AEDT installation Path C:\Program Files\ANSYS Inc\v251\AnsysEM
PyAEDT INFO: AEDT installation Path C:\Program Files\ANSYS Inc\v251\AnsysEM
PyEDB INFO: Ansoft.ElectronicsDesktop.2025.1 version started with process ID 1388.
PyAEDT INFO: Ansoft.ElectronicsDesktop.2025.1 version started with process ID 1388.
PyEDB INFO: EDB folder C:\Users\ansys\AppData\Local\Temp\tmp_efatxvq.ansys\gds_design.aedb has been imported to project gds_design
PyAEDT INFO: EDB folder C:\Users\ansys\AppData\Local\Temp\tmp_efatxvq.ansys\gds_design.aedb has been imported to project gds_design
PyEDB INFO: Active Design set to 0;IC_Wo_Component1
PyAEDT INFO: Active Design set to 0;IC_Wo_Component1
PyEDB INFO: Active Design set to 0;IC_Wo_Component1
PyAEDT INFO: Active Design set to 0;IC_Wo_Component1
PyEDB INFO: Aedt Objects correctly read
PyAEDT INFO: Aedt Objects correctly read
PyEDB INFO: Desktop has been released and closed.
PyAEDT INFO: Desktop has been released and closed.
Download this example
Download this example as a Jupyter Notebook or as a Python script.