Plot Nets with Matplotlib

This example shows how to use EDB Class to plot a net or a layout.

Import Section

import shutil
import os
import tempfile
from pyaedt import generate_unique_name, examples, Edb

File download

In this section the aedb file will be downloaded and copied in Temporary Folder.

Out:

'C:\\Users\\ansys\\AppData\\Local\\Temp\\Example_LU8O4W\\Galileo.aedb'

Launch EDB

This example launches the pyaedt.Edb class. This example uses EDB 2021.2 and uses SI units.

edb = Edb(edbpath=targetfolder, edbversion="2021.2")

Out:

pyaedt info: Logger Started on C:\Users\ansys\AppData\Local\Temp\Example_LU8O4W\pyaedt20220120_152657.log
pyaedt info: Logger Initialized in EDB
pyaedt info: EDB Path C:\Users\ansys\AppData\Local\Temp\Example_LU8O4W\Galileo.aedb
pyaedt info: EDB Version 2021.2
pyaedt info: EDB Standalone True
pyaedt info: Database Opened
pyaedt info: Cell Galileo_G87173_204 Opened
pyaedt info: C:\actions-runner\_work\PyAEDT\PyAEDT\pyaedt\dlls\EDBLib
pyaedt info: Refreshing the Components dictionary.
pyaedt info: Objects Initialized
pyaedt info: Builder Initialized
pyaedt info: Edb Initialized

Plot a custom set of nets colored by Layer (default).

edb.core_nets.plot("V3P3_S0")
Galileo_G87173_204

Out:

pyaedt info: Primitives Updated
pyaedt info: Plot Generation time 3.33 seconds

Plot a custom set of nets colored by Nets.

edb.core_nets.plot(["VREF", "V3P3_S0"], color_by_net=True)
Galileo_G87173_204

Out:

pyaedt info: Plot Generation time 1.125 seconds

Plot all nets on a layer colored by Nets.

edb.core_nets.plot(None, ["TOP"], color_by_net=True)
Galileo_G87173_204

Out:

pyaedt info: Plot Generation time 7.315 seconds

Close Db

edb.close_edb()

Out:

pyaedt info: EDB file release time: 0.00ms

True

Total running time of the script: ( 0 minutes 22.013 seconds)

Gallery generated by Sphinx-Gallery