IPC 2581 Export

This example shows how to use PyAEDT to Export an IPC2581 file.

# sphinx_gallery_thumbnail_path = 'Resources/ipc2581.png'

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_N8T161\Galileo.aedb

Launch EDB

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

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

Out:

pyaedt info: Logger Started on C:\Users\ansys\AppData\Local\Temp\Example_N8T161\pyaedt20220120_152539.log
pyaedt info: Logger Initialized in EDB
pyaedt info: EDB Path C:\Users\ansys\AppData\Local\Temp\Example_N8T161\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

Parametrize a Net

edb.core_primitives.parametrize_trace_width(
    "A0_N", parameter_name=generate_unique_name("Par"), variable_value="0.4321mm"
)

Out:

pyaedt info: Primitives Updated
pyaedt info: Creating Parameter Par_7MWYCD.

True

Create IPC2581 File

edb.export_to_ipc2581(ipc2581_file, "inch")
print("IPC2581 File has been saved to {}".format(ipc2581_file))

Out:

pyaedt info: Export IPC 2581 is starting. This operation can take a while...
pyaedt info: Export IPC 2581 completed in 3.7033751010894775 sec.
pyaedt info: File saved in C:\Users\ansys\AppData\Local\Temp\Example_N8T161\Galileo.xml
IPC2581 File has been saved to C:\Users\ansys\AppData\Local\Temp\Example_N8T161\Galileo.xml

Close EDB

edb.close_edb()

Out:

pyaedt info: EDB file release time: 0.00ms

True

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

Gallery generated by Sphinx-Gallery