Components#

class pyedb.dotnet.database.components.Components(p_edb)#

Bases: object

Manages EDB components and related method accessible from Edb.components property.

Parameters:
edb_classpyedb.dotnet.edb.Edb

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components

Overview#

import_definition

Import component definition from json file.

export_definition

Export component definitions to json file.

refresh_components

Refresh the component dictionary.

get_component_by_name

Retrieve a component by name.

get_components_from_nets

Retrieve components from a net list.

get_component_placement_vector

Get the placement vector between 2 components.

get_solder_ball_height

Get component solder ball height.

get_vendor_libraries

Retrieve all capacitors and inductors libraries from ANSYS installation (used by Siwave).

create_source_on_component

Create voltage, current source, or resistor on component.

create_port_on_pins

Create circuit port between pins and reference ones.

create_port_on_component

Create ports on a component.

replace_rlc_by_gap_boundaries

Replace RLC component by RLC gap boundaries. These boundary types are compatible with 3D modeler export.

deactivate_rlc_component

Deactivate RLC component with a possibility to convert it to a circuit port.

add_port_on_rlc_component

Deactivate RLC component and replace it with a circuit port.

add_rlc_boundary

Add RLC gap boundary on component and replace it with a circuit port.

create_rlc_component

Create physical Rlc component.

create

Create a component from pins.

create_component_from_pins

Create a component from pins.

set_component_model

Assign a Spice or Touchstone model to a component.

create_pingroup_from_pins

Create a pin group on a component.

delete_single_pin_rlc

Delete all RLC components with a single pin.

delete_component

Delete a component.

delete

Delete a component.

disable_rlc_component

Disable a RLC component.

set_solder_ball

Set cylindrical solder balls on a given component.

set_component_rlc

Update values for an RLC component.

update_rlc_from_bom

Update the EDC core component values (RLCs) with values coming from a BOM file.

import_bom

Load external BOM file.

export_bom

Export Bom file from layout.

find_by_reference_designator

Find a component.

get_pin_from_component

Retrieve the pins of a component.

get_aedt_pin_name

Retrieve the pin name that is shown in AEDT.

get_pins

Get component pins.

get_pin_position

Retrieve the pin position in meters.

get_pins_name_from_net

Retrieve pins belonging to a net.

get_nets_from_pin_list

Retrieve nets with one or more pins.

get_component_net_connection_info

Retrieve net connection information.

get_rats

Retrieve a list of dictionaries of the reference designator, pin names, and net names.

get_through_resistor_list

Retrieve through resistors.

short_component_pins

Short pins of component with a trace.

components

Component setup information.

instances

All Cell components objects.

definitions

Retrieve component definition list.

nport_comp_definition

Retrieve Nport component definition list.

resistors

Resistors.

capacitors

Capacitors.

inductors

Inductors.

ICs

Integrated circuits.

IOs

Circuit inupts and outputs.

Others

Other core components.

components_by_partname

Components by part name.

__getitem__

Get a component or component definition from the Edb project.

Import detail#

from pyedb.dotnet.database.components import Components

Property detail#

property Components.components#

Component setup information.

Deprecated since version 0.6.62: Use new property instances() instead.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Default dictionary for the EDB component.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.components
property Components.instances#

All Cell components objects.

Returns:
Dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Default dictionary for the EDB component.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.instances
property Components.definitions#

Retrieve component definition list.

Returns:
dict of EDBComponentDef
property Components.nport_comp_definition#

Retrieve Nport component definition list.

property Components.resistors#

Resistors.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Dictionary of resistors.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.resistors
property Components.capacitors#

Capacitors.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Dictionary of capacitors.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.capacitors
property Components.inductors#

Inductors.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Dictionary of inductors.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.inductors
property Components.ICs#

Integrated circuits.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Dictionary of integrated circuits.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.ICs
property Components.IOs#

Circuit inupts and outputs.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Dictionary of circuit inputs and outputs.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.IOs
property Components.Others#

Other core components.

Returns:
dict[str, pyedb.dotnet.database.cell.hierarchy.component.EDBComponent]

Dictionary of other core components.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.others
property Components.components_by_partname#

Components by part name.

Returns:
dict

Dictionary of components by part name.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.components_by_partname

Method detail#

Components.__getitem__(name)#

Get a component or component definition from the Edb project.

Parameters:
namestr
Returns:
pyedb.dotnet.database.cell.hierarchy.component.EDBComponent
Components.import_definition(file_path)#

Import component definition from json file.

Parameters:
file_pathstr

File path of json file.

Components.export_definition(file_path)#

Export component definitions to json file.

Parameters:
file_pathstr

File path of json file.

Returns:
Components.refresh_components()#

Refresh the component dictionary.

Components.get_component_by_name(name)#

Retrieve a component by name.

Parameters:
namestr

Name of the component.

Returns:
bool

True when successful, False when failed.

Components.get_components_from_nets(netlist=None)#

Retrieve components from a net list.

Parameters:
netliststr, optional

Name of the net list. The default is None.

Returns:
list

List of components that belong to the signal nets.

Components.get_component_placement_vector(mounted_component, hosting_component, mounted_component_pin1, mounted_component_pin2, hosting_component_pin1, hosting_component_pin2, flipped=False)#

Get the placement vector between 2 components.

Parameters:
mounted_componentedb.cell.hierarchy._hierarchy.Component

Mounted component name.

hosting_componentedb.cell.hierarchy._hierarchy.Component

Hosting component name.

mounted_component_pin1str

Mounted component Pin 1 name.

mounted_component_pin2str

Mounted component Pin 2 name.

hosting_component_pin1str

Hosted component Pin 1 name.

hosting_component_pin2str

Hosted component Pin 2 name.

flippedbool, optional

Either if the mounted component will be flipped or not.

Returns:
tuple

Tuple of Vector offset, rotation and solder height.

Examples

>>> edb1 = Edb(edbpath=targetfile1, edbversion="2021.2")
>>> hosting_cmp = edb1.components.get_component_by_name("U100")
>>> mounted_cmp = edb2.components.get_component_by_name("BGA")
>>> vector, rotation, solder_ball_height = edb1.components.get_component_placement_vector(
...     mounted_component=mounted_cmp,
...     hosting_component=hosting_cmp,
...     mounted_component_pin1="A12",
...     mounted_component_pin2="A14",
...     hosting_component_pin1="A12",
...     hosting_component_pin2="A14",
... )
Components.get_solder_ball_height(cmp)#

Get component solder ball height.

Parameters:
cmpstr or self._pedb.component

EDB component or str component name.

Returns:
double, bool

Salder ball height vale, False when failed.

Components.get_vendor_libraries()#

Retrieve all capacitors and inductors libraries from ANSYS installation (used by Siwave).

Returns:
ComponentLib object contains nested dictionaries to navigate through [component type][vendors][series]
class:

pyedb.component_libraries.ansys_components.ComponentPart ..

Examples

>>> edbapp = Edb()
>>> comp_lib = edbapp.components.get_vendor_libraries()
>>> network = comp_lib.capacitors["AVX"]["AccuP01005"]["C005YJ0R1ABSTR"].s_parameters
>>> network.write_touchstone(os.path.join(edbapp.directory, "test_export.s2p"))
Components.create_source_on_component(sources=None)#

Create voltage, current source, or resistor on component.

Parameters:
sourceslist[Source]

List of edb_data.sources.Source objects.

Returns:
bool

True when successful, False when failed.

Components.create_port_on_pins(refdes, pins, reference_pins, impedance=50.0, port_name=None, pec_boundary=False, pingroup_on_single_pin=False)#

Create circuit port between pins and reference ones.

Parameters:
refdesComponent reference designator

str or EDBComponent object.

pinspin specifier(s) or instance(s) where the port terminal is to be created. Single pin name or a list of
several can be provided. If several pins are provided a pin group will be created. Pin specifiers can be the
global EDB object ID or padstack instance name or pin name on component with refdes ``refdes``. Pin instances
can be provided as ``EDBPadstackInstance`` objects.
For instance for the pin called ``Pin1`` located on component with refdes ``U1``: ``U1-Pin1``, ``Pin1`` with
``refdes=U1``, the pin’s global EDB object ID, or the ``EDBPadstackInstance`` corresponding to the pin can be
provided.

Union[int, str, EDBPadstackInstance], List[Union[int, str, EDBPadstackInstance]]

reference_pinsreference pin specifier(s) or instance(s) for the port reference terminal. Allowed values are
the same as for the ``pins`` parameter.

Union[int, str, EDBPadstackInstance], List[Union[int, str, EDBPadstackInstance]]

impedancePort impedance

str, float

port_namestr, optional

Port name. The default is None, in which case a name is automatically assigned.

pec_boundarybool, optional
Whether to define the PEC boundary, The default is ``False``. If set to ``True``,
a perfect short is created between the pin and impedance is ignored. This
parameter is only supported on a port created between two pins, such as
when there is no pin group.
pingroup_on_single_pinbool

If True force using pingroup definition on single pin to have the port created at the pad center. If False the port is created at the pad edge. Default value is False.

Returns:
EDB terminal created, or False if failed to create.
Example:
>>> :obj:`from` :obj:`pyedb` :obj:`import` :obj:`Edb`
    ..
>>> :obj:`edb` = :obj:`Edb`\(:obj:`path_to_edb_file`)
    ..
>>> :obj:`pin` = "AJ6"
    ..
>>> :obj:`ref_pins` = ["AM7", "AM4"]
    ..
Or to take all reference pins
>>> :obj:`ref_pins` = [:obj:`pin` :obj:`for` :obj:`pin` :obj:`in` :class:`python:list`\(:obj:`edb.components`\["U2A5"]:obj:`.pins.values`\()) :obj:`if` :obj:`pin.net_name` == "GND"]
    ..
>>> :obj:`edb.components.create_port_on_pins`\(refdes="U2A5", pins=pin, reference_pins=ref_pins)
    ..
>>> :obj:`edb.save_edb`\()
    ..
>>> :obj:`edb.close_edb`\()
    ..
Components.create_port_on_component(component, net_list, port_type=SourceType.CoaxPort, do_pingroup=True, reference_net='gnd', port_name=None, solder_balls_height=None, solder_balls_size=None, solder_balls_mid_size=None, extend_reference_pins_outside_component=False)#

Create ports on a component.

Parameters:
componentstr or self._pedb.component

EDB component or str component name.

net_liststr or list of string.

List of nets where ports must be created on the component. If the net is not part of the component, this parameter is skipped.

port_typeSourceType enumerator, CoaxPort or CircuitPort

Type of port to create. CoaxPort generates solder balls. CircuitPort generates circuit ports on pins belonging to the net list.

do_pingroupbool

True activate pingroup during port creation (only used with combination of CircPort), False will take the closest reference pin and generate one port per signal pin.

refnetstr or list of string.

list of the reference net.

port_namestr

Port name for overwriting the default port-naming convention, which is [component][net][pin]. The port name must be unique. If a port with the specified name already exists, the default naming convention is used so that port creation does not fail.

solder_balls_heightfloat, optional

Solder balls height used for the component. When provided default value is overwritten and must be provided in meter.

solder_balls_sizefloat, optional

Solder balls diameter. When provided auto evaluation based on padstack size will be disabled.

solder_balls_mid_sizefloat, optional

Solder balls mid-diameter. When provided if value is different than solder balls size, spheroid shape will be switched.

extend_reference_pins_outside_componentbool

When no reference pins are found on the component extend the pins search with taking the closest one. If do_pingroup is True will be set to False. Default value is False.

Returns:
double, bool

Salder ball height vale, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> net_list = ["M_DQ<1>", "M_DQ<2>", "M_DQ<3>", "M_DQ<4>", "M_DQ<5>"]
>>> edbapp.components.create_port_on_component(cmp="U2A5", net_list=net_list,
>>> port_type=SourceType.CoaxPort, do_pingroup=False, refnet="GND")
Components.replace_rlc_by_gap_boundaries(component=None)#

Replace RLC component by RLC gap boundaries. These boundary types are compatible with 3D modeler export. Only 2 pins RLC components are supported in this command.

Parameters:
componentstr

Reference designator of the RLC component.

Returns:
bool
True when succeed, False if it failed.

Examples

>>> from pyedb import Edb
>>> edb = Edb(edb_file)
>>>  for refdes, cmp in edb.components.capacitors.items():
>>>     edb.components.replace_rlc_by_gap_boundaries(refdes)
>>> edb.save_edb()
>>> edb.close_edb()
Components.deactivate_rlc_component(component=None, create_circuit_port=False, pec_boundary=False)#

Deactivate RLC component with a possibility to convert it to a circuit port.

Parameters:
componentstr

Reference designator of the RLC component.

create_circuit_portbool, optional

Whether to replace the deactivated RLC component with a circuit port. The default is False.

pec_boundarybool, optional

Whether to define the PEC boundary, The default is False. If set to True, a perfect short is created between the pin and impedance is ignored. This parameter is only supported on a port created between two pins, such as when there is no pin group.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edb_file = r"C:\my_edb_file.aedb"
>>> edb = Edb(edb_file)
>>> for cmp in list(edb.components.instances.keys()):
>>>     edb.components.deactivate_rlc_component(component=cmp, create_circuit_port=False)
>>> edb.save_edb()
>>> edb.close_edb()
Components.add_port_on_rlc_component(component=None, circuit_ports=True, pec_boundary=False)#

Deactivate RLC component and replace it with a circuit port. The circuit port supports only two-pin components.

Parameters:
componentstr

Reference designator of the RLC component.

circuit_portsbool

True will replace RLC component by circuit ports, False gap ports compatible with HFSS 3D modeler export.

pec_boundarybool, optional

Whether to define the PEC boundary, The default is False. If set to True, a perfect short is created between the pin and impedance is ignored. This parameter is only supported on a port created between two pins, such as when there is no pin group.

Returns:
bool

True when successful, False when failed.

Components.add_rlc_boundary(component=None, circuit_type=True)#

Add RLC gap boundary on component and replace it with a circuit port. The circuit port supports only 2-pin components.

Parameters:
componentstr

Reference designator of the RLC component.

circuit_typebool

When True circuit type are defined, if False gap type will be used instead (compatible with HFSS 3D modeler). Default value is True.

Returns:
bool

True when successful, False when failed.

Components.create_rlc_component(pins, component_name='', r_value=None, c_value=None, l_value=None, is_parallel=False)#

Create physical Rlc component.

Parameters:
pinslist

List of EDB pins, length must be 2, since only 2 pins component are currently supported. It can be an dotnet.database.edb_data.padstacks_data.EDBPadstackInstance object or an Edb Padstack Instance object.

component_namestr

Component definition name.

r_valuefloat

Resistor value.

c_valuefloat

Capacitance value.

l_valuefloat

Inductor value.

is_parallelbool

Using parallel model when True, series when False.

Returns:
Component

Created EDB component.

Components.create(pins, component_name=None, placement_layer=None, component_part_name=None, is_rlc=False, r_value=None, c_value=None, l_value=None, is_parallel=False)#

Create a component from pins.

Parameters:
pinslist

List of EDB core pins.

component_namestr

Name of the reference designator for the component.

placement_layerstr, optional

Name of the layer used for placing the component.

component_part_namestr, optional

Part name of the component.

is_rlcbool, optional

Whether if the new component will be an RLC or not.

r_valuefloat

Resistor value.

c_valuefloat

Capacitance value.

l_valuefloat

Inductor value.

is_parallelbool

Using parallel model when True, series when False.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> pins = edbapp.components.get_pin_from_component("A1")
>>> edbapp.components.create(pins, "A1New")
Components.create_component_from_pins(pins, component_name, placement_layer=None, component_part_name=None)#

Create a component from pins.

Deprecated since version 0.6.62: Use create() method instead.

Parameters:
pinslist

List of EDB core pins.

component_namestr

Name of the reference designator for the component.

placement_layerstr, optional

Name of the layer used for placing the component.

component_part_namestr, optional

Part name of the component. It’s created a new definition if doesn’t exists.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> pins = edbapp.components.get_pin_from_component("A1")
>>> edbapp.components.create(pins, "A1New")
Components.set_component_model(componentname, model_type='Spice', modelpath=None, modelname=None)#

Assign a Spice or Touchstone model to a component.

Parameters:
componentnamestr

Name of the component.

model_typestr, optional

Type of the model. Options are "Spice" and "Touchstone". The default is "Spice".

modelpathstr, optional

Full path to the model file. The default is None.

modelnamestr, optional

Name of the model. The default is None.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.set_component_model(
...     "A1", model_type="Spice", modelpath="pathtospfile", modelname="spicemodelname"
... )
Components.create_pingroup_from_pins(pins, group_name=None)#

Create a pin group on a component.

Parameters:
pinslist

List of EDB pins.

group_namestr, optional

Name for the group. The default is None, in which case a default name is assigned as follows: [component Name] [NetName].

Returns:
tuple

The tuple is structured as: (bool, pingroup).

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.create_pingroup_from_pins(gndpinlist, "MyGNDPingroup")
Components.delete_single_pin_rlc(deactivate_only: bool = False) list#

Delete all RLC components with a single pin. Single pin component model type will be reverted to "RLC".

Parameters:
deactivate_onlybool, optional

Whether to only deactivate RLC components with a single point rather than delete them. The default is False, in which case they are deleted.

Returns:
list

List of deleted RLC components.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> list_of_deleted_rlcs = edbapp.components.delete_single_pin_rlc()
>>> print(list_of_deleted_rlcs)
Components.delete_component(component_name)#

Delete a component.

Deprecated since version 0.6.62: Use delete() method instead.

Parameters:
component_namestr

Name of the component.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.delete("A1")
Components.delete(component_name)#

Delete a component.

Parameters:
component_namestr

Name of the component.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.delete("A1")
Components.disable_rlc_component(component_name)#

Disable a RLC component.

Parameters:
component_namestr

Name of the RLC component.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.disable_rlc_component("A1")
Components.set_solder_ball(component='', sball_diam=None, sball_height=None, shape='Cylinder', sball_mid_diam=None, chip_orientation='chip_down', auto_reference_size=True, reference_size_x=0, reference_size_y=0, reference_height=0)#

Set cylindrical solder balls on a given component.

Parameters:
componentstr or EDB component, optional

Name of the discrete component.

sball_diamstr, float, optional

Diameter of the solder ball.

sball_heightstr, float, optional

Height of the solder ball.

shapestr, optional

Shape of solder ball. Options are "Cylinder", "Spheroid". The default is "Cylinder".

sball_mid_diamstr, float, optional

Mid diameter of the solder ball.

chip_orientationstr, optional

Give the chip orientation, "chip_down" or "chip_up". Default is "chip_down". Only applicable on IC model.

auto_reference_sizebool, optional

Whether to automatically set reference size.

reference_size_xint, str, float, optional

X size of the reference. Applicable when auto_reference_size is False.

reference_size_yint, str, float, optional

Y size of the reference. Applicable when auto_reference_size is False.

reference_heightint, str, float, optional

Height of the reference. Applicable when auto_reference_size is False.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.set_solder_ball("A1")
Components.set_component_rlc(componentname, res_value=None, ind_value=None, cap_value=None, isparallel=False)#

Update values for an RLC component.

Parameters:
componentname

Name of the RLC component.

res_valuefloat, optional

Resistance value. The default is None.

ind_valuefloat, optional

Inductor value. The default is None.

cap_valuefloat optional

Capacitor value. The default is None.

isparallelbool, optional

Whether the RLC component is parallel. The default is False.

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.set_component_rlc("R1", res_value=50, ind_value=1e-9, cap_value=1e-12, isparallel=False)
Components.update_rlc_from_bom(bom_file, delimiter=';', valuefield='Func des', comptype='Prod name', refdes='Pos / Place')#

Update the EDC core component values (RLCs) with values coming from a BOM file.

Parameters:
bom_filestr

Full path to the BOM file, which is a delimited text file. Header values needed inside the BOM reader must be explicitly set if different from the defaults.

delimiterstr, optional

Value to use for the delimiter. The default is ";".

valuefieldstr, optional

Field header containing the value of the component. The default is "Func des". The value for this parameter must being with the value of the component followed by a space and then the rest of the value. For example, "22pF".

comptypestr, optional

Field header containing the type of component. The default is "Prod name". For example, you might enter "Inductor".

refdesstr, optional

Field header containing the reference designator of the component. The default is "Pos / Place". For example, you might enter "C100".

Returns:
bool

True if the file contains the header and it is correctly parsed. True is returned even if no values are assigned.

Components.import_bom(bom_file, delimiter=',', refdes_col=0, part_name_col=1, comp_type_col=2, value_col=3)#

Load external BOM file.

Parameters:
bom_filestr

Full path to the BOM file, which is a delimited text file.

delimiterstr, optional

Value to use for the delimiter. The default is ",".

refdes_colint, optional

Column index of reference designator. The default is "0".

part_name_colint, optional

Column index of part name. The default is "1". Set to None if the column does not exist.

comp_type_colint, optional

Column index of component type. The default is "2".

value_colint, optional

Column index of value. The default is "3". Set to None if the column does not exist.

Returns:
bool
Components.export_bom(bom_file, delimiter=',')#

Export Bom file from layout.

Parameters:
bom_filestr

Full path to the BOM file, which is a delimited text file.

delimiterstr, optional

Value to use for the delimiter. The default is ",".

Components.find_by_reference_designator(reference_designator)#

Find a component.

Parameters:
reference_designatorstr

Reference designator of the component.

Components.get_pin_from_component(component, netName=None, pinName=None, net_name=None, pin_name=None)#

Retrieve the pins of a component.

Parameters:
componentstr or EDB component

Name of the component or the EDB component object.

netNamestr, optional

Filter on the net name as an alternative to pinName. The default is None.

pinNamestr, optional

Filter on the pin name an alternative to netName. The default is None.

net_namestr, optional

Filter on the net name as an alternative to pin_name. The default is None. This parameter is added to add compatibility with grpc and is recommended using it rather than netName.

pin_namestr, optional

Filter on the pin name an alternative to netName. The default is None. This parameter is added to add compatibility with grpc and is recommended using it rather than pinName.

Returns:
list

List of pins when the component is found or [] otherwise.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_pin_from_component("R1", refdes)
Components.get_aedt_pin_name(pin)#

Retrieve the pin name that is shown in AEDT.

Note

To obtain the EDB core pin name, use pin.GetName().

Parameters:
pinstr

Name of the pin in EDB core.

Returns:
str

Name of the pin in AEDT.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_aedt_pin_name(pin)
Components.get_pins(reference_designator, net_name=None, pin_name=None)#

Get component pins.

Parameters:
reference_designatorstr

Reference designator of the component.

net_namestr, optional

Name of the net.

pin_namestr, optional

Name of the pin.

Returns:
Components.get_pin_position(pin)#

Retrieve the pin position in meters.

Parameters:
pinstr

Name of the pin.

Returns:
list

Pin position as a list of float values in the form [x, y].

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_pin_position(pin)
Components.get_pins_name_from_net(net_name, pin_list=None)#

Retrieve pins belonging to a net.

Parameters:
pin_listlist of EDBPadstackInstance, optional

List of pins to check. The default is None, in which case all pins are checked

net_namestr

Name of the net.

Returns:
list of str names:

Pins belonging to the net.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_pins_name_from_net(pin_list, net_name)
Components.get_nets_from_pin_list(PinList)#

Retrieve nets with one or more pins.

Parameters:
PinListlist

List of pins.

Returns:
list

List of nets with one or more pins.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_nets_from_pin_list(pinlist)
Components.get_component_net_connection_info(refdes)#

Retrieve net connection information.

Parameters:
refdes

Reference designator for the net.

Returns:
dict

Dictionary of the net connection information for the reference designator.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_component_net_connection_info(refdes)
Components.get_rats()#

Retrieve a list of dictionaries of the reference designator, pin names, and net names.

Returns:
list

List of dictionaries of the reference designator, pin names, and net names.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_rats()
Components.get_through_resistor_list(threshold=1)#

Retrieve through resistors.

Parameters:
thresholdint, optional

Threshold value. The default is 1.

Returns:
list

List of through resistors.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder", "project name", "release version")
>>> edbapp.components.get_through_resistor_list()
Components.short_component_pins(component_name, pins_to_short=None, width=0.001)#

Short pins of component with a trace.

Parameters:
component_namestr

Name of the component.

pins_to_shortlist, optional

List of pins to short. If None, all pins will be shorted.

widthfloat, optional

Short Trace width. It will be used in trace computation algorithm

Returns:
bool

True when successful, False when failed.

Examples

>>> from pyedb import Edb
>>> edbapp = Edb("myaedbfolder")
>>> edbapp.components.short_component_pins("J4A2", ["G4", "9", "3"])