Edb#

class pyedb.grpc.edb.Edb(edbpath: str | pyedb.grpc.database.primitive.path.Path = None, cellname: str = None, isreadonly: bool = False, edbversion: str = None, isaedtowned: bool = False, oproject=None, use_ppe: bool = False, control_file: str = None, map_file: str = None, technology_file: str = None, layer_filter: str = None, restart_rpc_server=False)#

Bases: pyedb.grpc.edb_init.EdbInit

Main class for interacting with Ansys Electronics Desktop Database (EDB).

Provides comprehensive control over EDB projects including: - Project creation/management - Layout import/export - Material/stackup configuration - Component/net management - Simulation setup - Cutout operations - Parameterization

Parameters:
edbpathstr or Path, optional

Full path to AEDB folder or layout file to import. Supported formats: BRD, MCM, XML (IPC2581), GDS, ODB++ (TGZ/ZIP), DXF. Default creates new AEDB in documents folder.

cellnamestr, optional

Specific cell to open. Default opens first cell.

isreadonlybool, optional

Open in read-only mode. Default False.

edbversionstr, int, float, optional

EDB version (e.g., “2023.2”, 232, 23.2). Default uses latest.

isaedtownedbool, optional

Launch from HFSS 3D Layout. Default False.

oprojectobject, optional

Reference to AEDT project object.

student_versionbool, optional

Use student version. Default False.

use_ppebool, optional

Use PPE license. Default False.

control_filestr, optional

XML control file path for import.

map_filestr, optional

Layer map file for import.

technology_filestr, optional

Technology file for import (GDS only).

layer_filterstr, optional

Layer filter file for import.

remove_existing_aedtbool, optional

Remove existing AEDT project files. Default False.

restart_rpc_serverbool, optional

Restart gRPC server. Use with caution. Default False.

Examples

>>> # Create new EDB:
>>> edb = Edb()
>>> # Open existing AEDB:
>>> edb = Edb("myproject.aedb")
>>> # Import board file:
>>> edb = Edb("my_board.brd")

Overview#

value

Convert a value into a pyedb value.

open

Open EDB database.

open_edb

Open EDB database.

create

Create new EDB database.

create_edb

Deprecated since version 0.50.1.

import_layout_pcb

Import layout file and generate AEDB.

import_layout_file

Import a board file and generate an edb.def file in the working directory.

import_vlctech_stackup

Import a vlc.tech file and generate an edb.def file in the working directory containing only the stackup.

export_to_ipc2581

Export design to IPC2581 format.

edb_exception

Log Python exceptions to EDB logger.

get_connected_objects

Get objects connected to a layout object.

point_3d

Create 3D point.

point_data

Create 2D point.

close_edb

Close EDB and clean up resources.

save_edb

Save current EDB database.

save_edb_as

Save EDB database to new location.

execute

Execute EDB utility command (Not implemented in gRPC).

import_cadence_file

Import Cadence board file.

import_gds_file

Import GDS file.

cutout

Create a cutout using an approach entirely based on PyAEDT.

export_hfss

Export to HFSS project.

export_q3d

Export to Q3D project.

export_maxwell

Export to Maxwell project.

solve_siwave

Solve with SIwave.

export_siwave_dc_results

Export SIwave DC results.

variable_exists

Check if variable exists.

get_variable

Get variable value.

get_variable_value

Deprecated method to get the value of a variable.

get_all_variable_names

Method added for compatibility with grpc.

add_project_variable

Add project variable.

add_design_variable

Add design variable.

change_design_variable_value

Update variable value.

get_bounding_box

Get layout bounding box.

get_statistics

Get layout statistics.

are_port_reference_terminals_connected

Check if port reference terminals are connected.

create_hfss_setup

Create an HFSS simulation setup from a template.

create_raptorx_setup

Create RaptorX analysis setup (2024R2+ only).

create_hfsspi_setup

create_siwave_syz_setup

Create SIwave SYZ analysis setup.

create_siwave_dc_setup

Create SIwave DC analysis setup.

calculate_initial_extent

Compute a float representing the larger number between the dielectric thickness or trace width

copy_zones

Copy multi-zone EDB project to one new edb per zone.

cutout_multizone_layout

Create a multizone project cutout.

create_port

Create a port.

create_voltage_probe

Create a voltage probe.

create_voltage_source

Create a voltage source.

create_current_source

Create a current source.

get_point_terminal

Place terminal between two points.

auto_parametrize_design

Automatically parametrize design elements.

create_model_for_arbitrary_wave_ports

Create simplified model for arbitrary wave port generation.

export_gds_comp_xml

Export component data to GDS XML control file.

compare

Compares current open database with another one.

import_layout_component

Import a layout component inside the current layout and place it at the origin.

export_layout_component

Export a layout component from the current layout.

copy_cell_from_edb

Copy Cells from another Edb Database into this Database.

core

Ansys Edb Core module.

ansys_em_path

cell_names

List of all cell names in the database.

design_variables

All design variables in active cell.

project_variables

All project variables in database.

layout_validation

Layout validation utilities.

variables

All variables (project + design) in database.

terminals

Terminals in active layout.

excitations

All layout excitations.

ports

All ports in design.

excitations_nets

Nets with excitations defined.

sources

All layout sources.

voltage_regulator_modules

Voltage regulator modules in design.

probes

All layout probes.

configuration

Project configuration manager.

active_db

Active database object.

active_cell

Active cell in the database.

components

Component management interface.

stackup

Stackup management interface.

source_excitation

Source excitation management.

materials

Material database interface.

padstacks

Padstack management interface.

siwave

SIwave simulation interface.

hfss

HFSS simulation interface.

nets

Net management interface.

net_classes

Net class management.

extended_nets

Extended net management.

differential_pairs

Differential pair management.

modeler

Geometry modeling interface.

layout

Layout access interface.

active_layout

Active layout access.

layout_instance

Layout instance object.

design_mode

Get mode of the edb design.

setups

Get the dictionary of all EDB HFSS and SIwave setups.

hfss_setups

Active HFSS setup in EDB.

siwave_dc_setups

Active Siwave DC IR Setups.

siwave_ac_setups

Active Siwave SYZ setups.

definitions

EDB definitions access.

workflow

Workflow automation interface.

number_with_units

Convert a number to a string with units. If value is a string, it’s returned as is.

write_export3d_option_config_file

Write the options for a 3D export to a configuration file.

__enter__

Context manager entry.

__exit__

Context manager exit. Closes EDB and cleans up resources.

__getitem__

Get project or design variable value.

__setitem__

Set project or design variable.

Import detail#

from pyedb.grpc.edb import Edb

Property detail#

property Edb.core: ansys.edb.core#

Ansys Edb Core module.

property Edb.ansys_em_path#
property Edb.cell_names: List[str]#

List of all cell names in the database.

Returns:
list[str]

Names of all circuit cells.

property Edb.design_variables: Dict[str, float]#

All design variables in active cell.

Returns:
dict[str, float]

Variable names and values.

property Edb.project_variables: Dict[str, float]#

All project variables in database.

Returns:
dict[str, float]

Variable names and values.

property Edb.layout_validation: pyedb.grpc.database.layout_validation.LayoutValidation#

Layout validation utilities.

Returns:
LayoutValidation

Tools for design rule checking and layout validation.

property Edb.variables: Dict[str, float]#

All variables (project + design) in database.

Returns:
dict[str, float]

Combined dictionary of all variables.

property Edb.terminals: Dict[str, pyedb.grpc.database.terminal.terminal.Terminal]#

Terminals in active layout.

Returns:
dict[str, Terminal]

Terminal names and objects.

property Edb.excitations: Dict[str, pyedb.grpc.database.ports.ports.GapPort]#

All layout excitations.

Returns:
dict[str, GapPort]

Excitation names and objects.

property Edb.ports: Dict[str, pyedb.grpc.database.ports.ports.GapPort]#

All ports in design.

Returns:
dict[str, list[GapPort or WavePort or CoaxPort]]

Port names and objects.

property Edb.excitations_nets: List[str]#

Nets with excitations defined.

Returns:
list[str]

Net names with excitations.

property Edb.sources: Dict[str, pyedb.grpc.database.terminal.terminal.Terminal]#

All layout sources.

Returns:
dict[str, Terminal]

Source names and objects.

property Edb.voltage_regulator_modules#

Voltage regulator modules in design.

Returns:
dict[str, VoltageRegulator]

VRM names and objects.

property Edb.probes: Dict[str, pyedb.grpc.database.terminal.terminal.Terminal]#

All layout probes.

Returns:
dict[str, Terminal]

Probe names and objects.

property Edb.configuration: pyedb.configuration.configuration.Configuration#

Project configuration manager.

Returns:
Configuration

Configuration file interface.

property Edb.active_db#

Active database object.

Returns:
ansys.edb.core.database.Database

Current database instance.

property Edb.active_cell#

Active cell in the database.

Returns:
ansys.edb.core.layout.cell.Cell

Currently active cell.

property Edb.components: pyedb.grpc.database.components.Components#

Component management interface.

Returns:
Components

Component manipulation tools.

property Edb.stackup: pyedb.grpc.database.stackup.Stackup#

Stackup management interface.

Returns:
Stackup

Layer stack configuration tools.

property Edb.source_excitation: pyedb.grpc.database.source_excitations.SourceExcitation#

Source excitation management.

Returns:
SourceExcitation

Source and port creation tools.

property Edb.materials: pyedb.grpc.database.definition.materials.Materials#

Material database interface.

Returns:
Materials

Material definition and management.

property Edb.padstacks: pyedb.grpc.database.padstacks.Padstacks#

Padstack management interface.

Returns:
Padstacks

Padstack definition and editing.

property Edb.siwave: pyedb.grpc.database.siwave.Siwave#

SIwave simulation interface.

Returns:
Siwave

SIwave analysis setup tools.

property Edb.hfss: pyedb.grpc.database.hfss.Hfss#

HFSS simulation interface.

Returns:
Hfss

HFSS analysis setup tools.

property Edb.nets: pyedb.grpc.database.nets.Nets#

Net management interface.

Returns:
Nets

Net manipulation tools.

property Edb.net_classes: pyedb.grpc.database.nets.NetClasses#

Net class management.

Returns:
NetClass

Net classes objects.

property Edb.extended_nets: pyedb.grpc.database.net.extended_net.ExtendedNets#

Extended net management.

Returns:
ExtendedNets

Extended net tools.

property Edb.differential_pairs: pyedb.grpc.database.net.differential_pair.DifferentialPairs#

Differential pair management.

Returns:
DifferentialPairs

Differential pair tools.

property Edb.modeler: pyedb.grpc.database.modeler.Modeler#

Geometry modeling interface.

Returns:
Modeler

Geometry creation and editing.

property Edb.layout: pyedb.grpc.database.layout.layout.Layout#

Layout access interface.

Returns:
Layout

Layout manipulation tools.

property Edb.active_layout: pyedb.grpc.database.layout.layout.Layout#

Active layout access.

Returns:
Layout

Current layout tools.

property Edb.layout_instance#

Layout instance object.

Returns:
LayoutInstance

Current layout instance.

property Edb.design_mode#

Get mode of the edb design. Returns ———- str

Value is either “General” or “IC”.

property Edb.setups: dict[str, pyedb.grpc.database.simulation_setup.hfss_simulation_setup.HfssSimulationSetup | pyedb.grpc.database.simulation_setup.siwave_simulation_setup.SiwaveSimulationSetup | pyedb.grpc.database.simulation_setup.siwave_dcir_simulation_setup.SIWaveDCIRSimulationSetup | pyedb.grpc.database.simulation_setup.raptor_x_simulation_setup.RaptorXSimulationSetup | pyedb.grpc.database.simulation_setup.siwave_cpa_simulation_setup.SIWaveCPASimulationSetup]#

Get the dictionary of all EDB HFSS and SIwave setups.

Returns:
Dict[str,:class:HfssSimulationSetup] or
Dict[str,:class:SiwaveSimulationSetup] or
Dict[str,:class:SIWaveDCIRSimulationSetup] or
Dict[str,:class:RaptorXSimulationSetup]
Dict[str,:class:SIWaveCPASimulationSetup]
property Edb.hfss_setups: dict[str, pyedb.grpc.database.simulation_setup.hfss_simulation_setup.HfssSimulationSetup]#

Active HFSS setup in EDB.

Returns:
Dict[str,
HfssSimulationSetup]
property Edb.siwave_dc_setups: dict[str, pyedb.grpc.database.simulation_setup.siwave_dcir_simulation_setup.SIWaveDCIRSimulationSetup]#

Active Siwave DC IR Setups.

Returns:
Dict[str,
:class:`SIWaveDCIRSimulationSetup
`]
property Edb.siwave_ac_setups: dict[str, pyedb.grpc.database.simulation_setup.siwave_simulation_setup.SiwaveSimulationSetup]#

Active Siwave SYZ setups.

Returns:
Dict[str,:class:SiwaveSimulationSetup]
property Edb.definitions#

EDB definitions access.

Returns:
Definitions

Definitions interface.

property Edb.workflow#

Workflow automation interface.

Returns:
Workflow

Workflow automation tools.

Attribute detail#

Edb.standalone = True#
Edb.oproject = None#
Edb.version = None#
Edb.isaedtowned = False#
Edb.isreadonly = False#
Edb.edbpath = None#
Edb.log_name = None#

Method detail#

Edb.__enter__()#

Context manager entry.

Edb.__exit__(ex_type, ex_value, ex_traceback)#

Context manager exit. Closes EDB and cleans up resources.

Edb.__getitem__(variable_name)#

Get project or design variable value.

Parameters:
variable_namestr

Variable name with ‘$’ for project variables.

Returns:
float or None

Variable value if exists, else None.

Edb.__setitem__(variable_name, variable_value)#

Set project or design variable.

Parameters:
variable_namestr

Variable name (with ‘$’ prefix for project variables).

variable_valuestr, float, int, list/tuple

Value with units. List/tuple format: [value, description]

static Edb.number_with_units(value, units=None)#

Convert a number to a string with units. If value is a string, it’s returned as is.

Parameters:
valuefloat, int, str

Input number or string.

unitsoptional

Units for formatting. The default is None, which uses "meter".

Returns:
str

String concatenating the value and unit.

Edb.value(val) float#

Convert a value into a pyedb value.

Edb.open(restart_rpc_server=False) bool#

Open EDB database.

Returns:
bool

True if successful, False otherwise.

Examples

>>> # Open an existing EDB database:
>>> edb = Edb("myproject.aedb")
Edb.open_edb(restart_rpc_server=False) bool#

Open EDB database.

Deprecated since version 0.50.1: Use open() instead.

Returns:
bool

True if successful, False otherwise.

Edb.create(restart_rpc_server=False) any#

Create new EDB database.

Returns:
bool

True if successful, False otherwise.

Edb.create_edb(restart_rpc_server=False) bool#

Deprecated since version 0.50.1: Use create() instead.

Returns:
bool

True if successful, False otherwise.

Edb.import_layout_pcb(input_file, working_dir='', anstranslator_full_path='', use_ppe=False, control_file=None, map_file=None, tech_file=None, layer_filter=None)#

Import layout file and generate AEDB.

Supported formats: BRD, MCM, XML (IPC2581), GDS, ODB++ (TGZ/ZIP), DXF

Parameters:
input_filestr

Full path to input file.

working_dirstr, optional

Output directory for AEDB.

anstranslator_full_pathstr, optional

Path to Ansys translator executable.

use_ppebool, optional

Use PPE license. Default False.

control_filestr, optional

XML control file path.

tech_filestr, optional

Technology file path.

map_filestr, optional

Layer map file path.

layer_filterstr, optional

Layer filter file path.

Returns:
str or bool

AEDB path if successful, False otherwise.

Edb.import_layout_file(input_file, working_dir='', anstranslator_full_path='', use_ppe=False, control_file=None, map_file=None, tech_file=None, layer_filter=None)#

Import a board file and generate an edb.def file in the working directory.

This function supports all AEDT formats, including DXF, GDS, SML (IPC2581), BRD, MCM, SIP, ZIP and TGZ.

Warning

Do not execute this function with untrusted function argument, environment variables or pyedb global settings. See the security guide for details.

Parameters:
input_filestr

Full path to the board file.

working_dirstr, optional

Directory in which to create the aedb folder. The name given to the AEDB file is the same as the name of the board file.

anstranslator_full_pathstr, optional

Full path to the Ansys translator. The default is "".

use_ppebool

Whether to use the PPE License. The default is False.

control_filestr, optional

Path to the XML file. The default is None, in which case an attempt is made to find the XML file in the same directory as the board file. To succeed, the XML file and board file must have the same name. Only the extension differs.

tech_filestr, optional

Technology file. The file can be *.ircx, *.vlc.tech, or *.itf

map_filestr, optional

Layer map .map file.

layer_filter:str,optional

Layer filter .txt file.

Returns:
Full path to the AEDB filestr

Examples

>>> # Import a BRD file:
>>> edb.import_layout_file("my_board.brd", r"C:/project")
>>> # Import a GDS file with control file:
>>> edb.import_layout_file("layout.gds", control_file="control.xml")
Edb.import_vlctech_stackup(vlctech_file, working_dir='', export_xml=None)#

Import a vlc.tech file and generate an edb.def file in the working directory containing only the stackup.

Parameters:
vlctech_filestr

Full path to the technology stackup file. It must be vlc.tech.

working_dirstr, optional

Directory in which to create the aedb folder. The name given to the AEDB file is the same as the name of the board file.

export_xmlstr, optional

Export technology file in XML control file format.

Returns:
Full path to the AEDB filestr
Edb.export_to_ipc2581(edbpath='', anstranslator_full_path='', ipc_path=None) str#

Export design to IPC2581 format.

Parameters:
edbpath: str

Full path to aedb folder of the design to convert.

anstranslator_full_pathstr, optional

Path to Ansys translator executable.

ipc_pathstr, optional

Output XML file path. Default: .xml.

Returns:
str

Path to output IPC2581 file, and corresponding log file.

Examples

>>> # Export to IPC2581 format:
>>> edb.export_to_ipc2581("output.xml")
Edb.edb_exception(ex_value, tb_data)#

Log Python exceptions to EDB logger.

Parameters:
ex_valueException

Exception value.

tb_datatraceback

Traceback object.

Edb.get_connected_objects(layout_object_instance)#

Get objects connected to a layout object.

Parameters:
layout_object_instance

Target layout object.

Returns:
list

Connected objects (padstacks, paths, polygons, etc.).

Edb.point_3d(x, y, z=0.0)#

Create 3D point.

Parameters:
xfloat, int, str

X coordinate.

yfloat, int, str

Y coordinate.

zfloat, int, str, optional

Z coordinate.

Returns:
Point3DData

3D point object.

Edb.point_data(x, y=None)#

Create 2D point.

Parameters:
xfloat, int, str or PointData

X coordinate or PointData object.

yfloat, int, str, optional

Y coordinate.

Returns:
PointData

2D point object.

Edb.close_edb() bool#

Close EDB and clean up resources.

..deprecated:: 0.51.0

Use close() instead.

Returns:
bool

True if successful, False otherwise.

Examples

Close the EDB session: >>> edb.close_edb()

Edb.save_edb() bool#

Save current EDB database.

..deprecated:: 0.51.0

Use save() instead.

Edb.save_edb_as(fname) bool#

Save EDB database to new location.

..deprecated:: 0.51.0

Use save_as() instead.

Edb.execute(func)#

Execute EDB utility command (Not implemented in gRPC).

Parameters:
funcstr

Command to execute.

Edb.import_cadence_file(inputBrd, WorkDir=None, anstranslator_full_path='', use_ppe=False) bool#

Import Cadence board file.

Deprecated since version 0.50.

Use import_layout_file() instead.

Edb.import_gds_file(inputGDS, anstranslator_full_path='', use_ppe=False, control_file=None, tech_file=None, map_file=None, layer_filter=None)#

Import GDS file.

Warning

Do not execute this function with untrusted function argument, environment variables or pyedb global settings. See the security guide for details.

Parameters:
inputGDSstr

GDS file path.

anstranslator_full_pathstr, optional

Ansys translator path.

use_ppebool, optional

Use PPE license. Default False.

control_filestr, optional

XML control file.

tech_filestr, optional

Technology file.

map_filestr, optional

Layer map file.

layer_filterstr, optional

Layer filter file.

Edb.cutout(signal_nets=None, reference_nets=None, extent_type='ConvexHull', expansion_size=0.002, use_round_corner=False, output_aedb_path=None, open_cutout_at_end=True, use_pyaedt_cutout=True, number_of_threads=1, use_pyaedt_extent_computing=True, extent_defeature=0, remove_single_pin_components=False, custom_extent=None, custom_extent_units='mm', include_partial_instances=False, keep_voids=True, check_terminals=False, include_pingroups=False, expansion_factor=0, maximum_iterations=10, preserve_components_with_model=False, simple_pad_check=True, keep_lines_as_path=False, include_voids_in_extents=False)#

Create a cutout using an approach entirely based on PyAEDT. This method replaces all legacy cutout methods in PyAEDT. It does in sequence: - delete all nets not in list, - create a extent of the nets, - check and delete all vias not in the extent, - check and delete all the primitives not in extent, - check and intersect all the primitives that intersect the extent.

Parameters:
signal_netslist

List of signal strings.

reference_netslist, optional

List of references to add. The default is ["GND"].

extent_typestr, optional

Type of the extension. Options are "Conforming", "ConvexHull", and "Bounding". The default is "Conforming".

expansion_sizefloat, str, optional

Expansion size ratio in meters. The default is 0.002.

use_round_cornerbool, optional

Whether to use round corners. The default is False.

output_aedb_pathstr, optional

Full path and name for the new AEDB file. If None, then current aedb will be cutout.

open_cutout_at_endbool, optional

Whether to open the cutout at the end. The default is True.

use_pyaedt_cutoutbool, optional

Whether to use new PyAEDT cutout method or EDB API method. New method is faster than native API method since it benefits of multithread.

number_of_threadsint, optional

Number of thread to use. Default is 4. Valid only if use_pyaedt_cutout is set to True.

use_pyaedt_extent_computingbool, optional

Whether to use legacy extent computing (experimental) or EDB API.

extent_defeaturefloat, optional

Defeature the cutout before applying it to produce simpler geometry for mesh (Experimental). It applies only to Conforming bounding box. Default value is 0 which disable it.

remove_single_pin_componentsbool, optional

Remove all Single Pin RLC after the cutout is completed. Default is False.

custom_extentlist

Points list defining the cutout shape. This setting will override extent_type field.

custom_extent_unitsstr

Units of the point list. The default is "mm". Valid only if custom_extend is provided.

include_partial_instancesbool, optional

Whether to include padstack instances that have bounding boxes intersecting with point list polygons. This operation may slow down the cutout export.Valid only if custom_extend and use_pyaedt_cutout is provided.

keep_voidsbool

Boolean used for keep or not the voids intersecting the polygon used for clipping the layout. Default value is True, False will remove the voids.Valid only if custom_extend is provided.

check_terminalsbool, optional

Whether to check for all reference terminals and increase extent to include them into the cutout. This applies to components which have a model (spice, touchstone or netlist) associated.

include_pingroupsbool, optional

Whether to check for all pingroups terminals and increase extent to include them into the cutout. It requires check_terminals.

expansion_factorint, optional

The method computes a float representing the largest number between the dielectric thickness or trace width multiplied by the expansion_factor factor. The trace width search is limited to nets with ports attached. Works only if use_pyaedt_cutout. Default is 0 to disable the search.

maximum_iterationsint, optional

Maximum number of iterations before stopping a search for a cutout with an error. Default is 10.

preserve_components_with_modelbool, optional

Whether to preserve all pins of components that have associated models (Spice or NPort). This parameter is applicable only for a PyAEDT cutout (except point list).

simple_pad_checkbool, optional

Whether to use the center of the pad to find the intersection with extent or use the bounding box. Second method is much slower and requires to disable multithread on padstack removal. Default is True.

keep_lines_as_pathbool, optional

Whether to keep the lines as Path after they are cutout or convert them to PolygonData. This feature works only in Electronics Desktop (3D Layout). If the flag is set to True it can cause issues in SiWave once the Edb is imported. Default is False to generate PolygonData of cut lines.

include_voids_in_extentsbool, optional

Whether to compute and include voids in pyaedt extent before the cutout. Cutout time can be affected. It works only with Conforming cutout. Default is False to generate extent without voids.

Returns:
List

List of coordinate points defining the extent used for clipping the design. If it failed return an empty list.

Examples

>>> from pyedb import Edb
>>> edb = Edb(r"C:\test.aedb", version="2022.2")
>>> edb.logger.info_timer("Edb Opening")
>>> edb.logger.reset_timer()
>>> start = time.time()
>>> signal_list = []
>>> for net in edb.nets.netlist:
>>>      if "3V3" in net:
>>>           signal_list.append(net)
>>> power_list = ["PGND"]
>>> edb.cutout(signal_nets=signal_list, reference_nets=power_list, extent_type="Conforming")
>>> end_time = str((time.time() - start) / 60)
>>> edb.logger.info("Total legacy cutout time in min %s", end_time)
>>> edb.nets.plot(signal_list, None, color_by_net=True)
>>> edb.nets.plot(power_list, None, color_by_net=True)
>>> edb.save()
>>> edb.close()
static Edb.write_export3d_option_config_file(path_to_output, config_dictionaries=None)#

Write the options for a 3D export to a configuration file.

Parameters:
path_to_outputstr

Full path to the configuration file to save 3D export options to.

config_dictionariesdict, optional

Configuration dictionaries. The default is None.

Edb.export_hfss(path_to_output, net_list=None, num_cores=None, aedt_file_name=None, hidden=False)#

Export to HFSS project.

Parameters:
path_to_outputstr

Output directory.

net_listlist, optional

Nets to export.

num_coresint, optional

Processing cores to use.

aedt_file_namestr, optional

Custom AEDT filename.

hiddenbool, optional

Run Siwave in background. Default False.

Returns:
str

Path to generated AEDT file.

Examples

>>> # Export to HFSS project:
>>> edb.export_hfss(r"C:/output", net_list=["SignalNet"])
Edb.export_q3d(path_to_output, net_list=None, num_cores=None, aedt_file_name=None, hidden=False)#

Export to Q3D project.

Parameters:
path_to_outputstr

Output directory.

net_listlist, optional

Nets to export.

num_coresint, optional

Processing cores to use.

aedt_file_namestr, optional

Custom AEDT filename.

hiddenbool, optional

Run Siwave in background. Default False.

Returns:
str

Path to generated AEDT file.

Examples

>>> # Export to Q3D project:
>>> edb.export_q3d(r"C:/output")
Edb.export_maxwell(path_to_output, net_list=None, num_cores=None, aedt_file_name=None, hidden=False)#

Export to Maxwell project.

Parameters:
path_to_outputstr

Output directory.

net_listlist, optional

Nets to export.

num_coresint, optional

Processing cores to use.

aedt_file_namestr, optional

Custom AEDT filename.

hiddenbool, optional

Run Siwave in background. Default False.

Returns:
str

Path to generated AEDT file.

Examples

>>> # Export to Maxwell project:
>>> edb.export_maxwell(r"C:/output")
Edb.solve_siwave()#

Solve with SIwave.

Returns:
str

Path to SIwave project.

Examples

>>> # Solve with SIwave:
>>> edb.solve_siwave()
Edb.export_siwave_dc_results(siwave_project, solution_name, output_folder=None, html_report=True, vias=True, voltage_probes=True, current_sources=True, voltage_sources=True, power_tree=True, loop_res=True)#

Export SIwave DC results.

Parameters:
siwave_projectstr

SIwave project path.

solution_namestr

DC analysis name.

output_folderstr, optional

Custom output folder.

html_reportbool, optional

Generate HTML report. Default True.

viasbool, optional

Export vias report. Default True.

voltage_probesbool, optional

Export voltage probes. Default True.

current_sourcesbool, optional

Export current sources. Default True.

voltage_sourcesbool, optional

Export voltage sources. Default True.

power_treebool, optional

Export power tree. Default True.

loop_resbool, optional

Export loop resistance. Default True.

Returns:
list[str]

Generated report files.

Edb.variable_exists(variable_name)#

Check if variable exists.

Parameters:
variable_namestr

Variable name.

Returns:
bool

True if variable exists.

Edb.get_variable(variable_name)#

Get variable value.

Parameters:
variable_namestr

Variable name.

Returns:
float or bool

Variable value if exists, else False.

Edb.get_variable_value(variable_name)#

Deprecated method to get the value of a variable.

Deprecated since version pyedb: 0.55.0 Use get_variable() instead.

Edb.get_all_variable_names() List[str]#

Method added for compatibility with grpc.

Returns:
List[str]

List of variable names.

Edb.add_project_variable(variable_name, variable_value, description=None) bool#

Add project variable.

Parameters:
variable_namestr

Variable name (auto-prefixed with ‘$’).

variable_valuestr, float

Variable value with units.

descriptionstr, optional

Variable description.

Returns:
bool

True if successful, False if variable exists.

Edb.add_design_variable(variable_name, variable_value, is_parameter=False, description=None) bool#

Add design variable.

Parameters:
variable_namestr

Variable name.

variable_valuestr, float

Variable value with units.

is_parameterbool, optional

Add as local variable. Default False.

descriptionstr, optional

Variable description.

Returns:
bool

True if successful, False if variable exists.

Edb.change_design_variable_value(variable_name, variable_value)#

Update variable value.

Parameters:
variable_namestr

Variable name.

variable_valuestr, float

New value with units.

Edb.get_bounding_box() tuple[tuple[float, float], tuple[float, float]]#

Get layout bounding box.

Returns:
list

list[list[min_x, min_y], list[max_x, max_y]] in meters.

Edb.get_statistics(compute_area=False)#

Get layout statistics.

Parameters:
compute_areabool, optional

Calculate net areas. Default False.

Returns:
LayoutStatistics

Layout statistics report.

Edb.are_port_reference_terminals_connected(common_reference=None)#

Check if port reference terminals are connected.

Parameters:
common_referencestr, optional

Reference net name to check.

Returns:
bool

True if all port references are connected.

Edb.create_hfss_setup(name=None, start_frequency='0GHz', stop_frequency='20GHz', step_frequency='10MHz') pyedb.grpc.database.simulation_setup.hfss_simulation_setup.HfssSimulationSetup#

Create an HFSS simulation setup from a template.

. deprecated:: pyedb 0.30.0 Use pyedb.grpc.core.hfss.add_setup() instead.

Edb.create_raptorx_setup(name=None) pyedb.grpc.database.simulation_setup.raptor_x_simulation_setup.RaptorXSimulationSetup#

Create RaptorX analysis setup (2024R2+ only).

Parameters:
namestr, optional

Setup name. Auto-generated if None.

Returns:
RaptorXSimulationSetup

RaptorX setup or False if unsupported.

Edb.create_hfsspi_setup(name=None)#
Edb.create_siwave_syz_setup(name=None, **kwargs) pyedb.grpc.database.simulation_setup.siwave_simulation_setup.SiwaveSimulationSetup#

Create SIwave SYZ analysis setup.

Parameters:
namestr, optional

Setup name. Auto-generated if None.

**kwargs

Setup properties to modify.

Returns:
SiwaveSimulationSetup

SYZ analysis setup.

Edb.create_siwave_dc_setup(name=None, **kwargs) ansys.edb.core.simulation_setup.siwave_dcir_simulation_setup.SIWaveDCIRSimulationSetup#

Create SIwave DC analysis setup.

Parameters:
namestr, optional

Setup name. Auto-generated if None.

**kwargs

Setup properties to modify.

Returns:
SIWaveDCIRSimulationSetup

DC analysis setup.

Edb.calculate_initial_extent(expansion_factor)#

Compute a float representing the larger number between the dielectric thickness or trace width multiplied by the nW factor. The trace width search is limited to nets with ports attached.

Parameters:
expansion_factorfloat

Value for the width multiplier (nW factor).

Returns:
float
Edb.copy_zones(working_directory=None) dict[str, tuple[int, ansys.edb.core.geometry.polygon_data.PolygonData]]#

Copy multi-zone EDB project to one new edb per zone.

Parameters:
working_directorystr

Directory path where all EDB project are copied, if empty will use the current EDB project.

Returns:
dict[str, tuple[int,:class:PolygonData ]]

Return a dictionary with edb path as key and tuple Zone Id as first item and EDB polygon Data defining the region as second item.

Edb.cutout_multizone_layout(zone_dict, common_reference_net=None)#

Create a multizone project cutout.

Parameters:
zone_dictdict[str](EDB PolygonData)

Dictionary with EDB path as key and EDB PolygonData as value defining the zone region. This dictionary is returned from the command copy_zones(): >>> edb = Edb(edb_file) >>> zone_dict = edb.copy_zones(r”C:Temp est”)

common_reference_netstr

the common reference net name. This net name must be provided to provide a valid project.

Returns:
dict[str: str] or list[str]

first dictionary defined_ports with edb name as key and existing port name list as value. Those ports are the ones defined before processing the multizone clipping. the second is the list of connected port.

Edb.create_port(terminal, ref_terminal=None, is_circuit_port=False, name=None)#

Create a port.

..deprecated:: 0.51.0

Use create_port() has been moved to source_excitation.create_port.

Edb.create_voltage_probe(terminal, ref_terminal)#

Create a voltage probe.

..deprecated:: 0.50.0

Use create_voltage_probe() has been moved to edb.source_excitation.create_voltage_probe.

Edb.create_voltage_source(terminal, ref_terminal)#

Create a voltage source.

..deprecated:: 0.50.0

Use: func:create_voltage_source has been moved to edb.source_excitation.create_voltage_source.

Edb.create_current_source(terminal, ref_terminal)#

Create a current source.

..deprecated:: 0.50.0

Use create_current_source() has been moved to edb.source_excitation.create_current_source.

Edb.get_point_terminal(name, net_name, location, layer)#

Place terminal between two points.

..deprecated:: 0.50.0

Use: func:get_point_terminal has been moved to edb.source_excitation.get_point_terminal.

Edb.auto_parametrize_design(layers=True, materials=True, via_holes=True, pads=True, antipads=True, traces=True, layer_filter=None, material_filter=None, padstack_definition_filter=None, trace_net_filter=None, use_single_variable_for_padstack_definitions=True, use_relative_variables=True, output_aedb_path=None, open_aedb_at_end=True, expand_polygons_size=0, expand_voids_size=0, via_offset=True)#

Automatically parametrize design elements.

Parameters:
layersbool, optional

Parametrize layer thicknesses. Default True.

materialsbool, optional

Parametrize material properties. Default True.

via_holesbool, optional

Parametrize via holes. Default True.

padsbool, optional

Parametrize pads. Default True.

antipadsbool, optional

Parametrize antipads. Default True.

tracesbool, optional

Parametrize trace widths. Default True.

layer_filterlist, optional

Layers to include. All if None.

material_filterlist, optional

Materials to include. All if None.

padstack_definition_filterlist, optional

Padstacks to include. All if None.

trace_net_filterlist, optional

Nets to parametrize. All if None.

use_single_variable_for_padstack_definitionsbool, optional

Single variable per padstack. Default True.

use_relative_variablesbool, optional

Use delta variables. Default True.

output_aedb_pathstr, optional

Output AEDB path.

open_aedb_at_endbool, optional

Open AEDB when finished. Default True.

expand_polygons_sizefloat, optional

Polygon expansion size. Default 0.

expand_voids_sizefloat, optional

Void expansion size. Default 0.

via_offsetbool, optional

Parametrize via positions. Default True.

Returns:
list[str]

Created parameter names.

Examples

Parametrize design elements: >>> params = edb.auto_parametrize_design( >>> layers=True, >>> materials=True, >>> trace_net_filter=[“Clock”])

Edb.create_model_for_arbitrary_wave_ports(temp_directory, mounting_side='top', signal_nets=None, terminal_diameter=None, output_edb=None, launching_box_thickness='100um')#

Create simplified model for arbitrary wave port generation.

Parameters:
temp_directorystr

Working directory.

mounting_sidestr, optional

Board orientation (“top” or “bottom”).

signal_netslist, optional

Nets to include. All if None.

terminal_diameterfloat, optional

Custom terminal diameter. Auto-calculated if None.

output_edbstr, optional

Output AEDB path.

launching_box_thicknessstr, optional

Wave port box thickness.

Returns:
bool

True if successful, False otherwise.

Edb.export_gds_comp_xml(comps_to_export, gds_comps_unit='mm', control_path=None)#

Export component data to GDS XML control file.

Parameters:
comps_to_exportlist

Components to export.

gds_comps_unitstr, optional

Output units. Default “mm”.

control_pathstr, optional

Output XML path.

Returns:
bool

True if successful, False otherwise.

Edb.compare(input_file, results='')#

Compares current open database with another one.

Warning

Do not execute this function with untrusted function argument, environment variables or pyedb global settings. See the security guide for details.

Parameters:
input_filestr

Path to the edb file.

results: str, optional

Path to directory in which results will be saved. If no path is given, a new “_compare_results” directory will be created with the same naming and path as the .aedb folder.

Returns
——-
bool

True when successful, False when failed.

Edb.import_layout_component(component_path) ansys.edb.core.hierarchy.layout_component.LayoutComponent#

Import a layout component inside the current layout and place it at the origin. This feature is only supported with PyEDB gRPC. Encryption is not yet supported.

Parameters:
component_pathstr

Layout component path (.aedbcomp file).

Returns:
class:LayoutComponent .
Edb.export_layout_component(component_path) bool#

Export a layout component from the current layout. This feature is only supported with PyEDB gRPC. Encryption is not yet supported.

Parameters:
component_pathstr

Layout component path (.aedbcomp file).

Returns:
bool

True if layout component is successfully exported, False otherwise.

Edb.copy_cell_from_edb(edb_path: pyedb.grpc.database.primitive.path.Path | str)#

Copy Cells from another Edb Database into this Database.