CfgComponents#

class pyedb.configuration.cfg_components.CfgComponents(pedb=None, components_data=None)#

Fluent builder for the components configuration list.

Overview#

get

Return a CfgComponent for an existing EDB component.

add

Add a component configuration entry.

clean

Clear all components from the list.

apply

Apply all component settings to the EDB design.

retrieve_parameters_from_edb

Read all component settings from the open EDB design.

get_data_from_db

Read all component settings from the open EDB design.

to_list

Serialize all configured components.

Import detail#

from pyedb.configuration.cfg_components import CfgComponents

Method detail#

CfgComponents.get(reference_designator: str) CfgComponent#

Return a CfgComponent for an existing EDB component.

The component is looked up by reference_designator in the live EDB session and its current properties (type, model, die, solder-ball, port) are pre-loaded into the returned builder. Mutate the returned object and then call edb.configuration.run(cfg) to push the changes back to the database.

If the component has already been registered via add() or a previous get() call, the cached entry is returned instead of creating a duplicate.

Parameters:
reference_designatorstr

Reference designator of the component to retrieve, e.g. "U1".

Returns:
CfgComponent

Component builder pre-populated with current EDB properties.

Raises:
KeyError

If no EDB session is attached or the component does not exist.

Examples

>>> cfg = edb.configuration.create_config_builder()
>>> u1 = cfg.components.get("U1")
>>> u1.set_solder_ball_properties("cylinder", "150um", "100um")
>>> edb.configuration.run(cfg)
CfgComponents.add(reference_designator: str, part_type=None, enabled=None, definition=None, placement_layer=None)#

Add a component configuration entry.

Parameters:
reference_designatorstr

Unique component reference designator (e.g. "U1").

part_typestr, optional

Component type. Accepted values: "resistor", "capacitor", "inductor", "ic", "io", "other".

enabledbool, optional

Whether the component is enabled in the simulation.

definitionstr, optional

Component part definition name.

placement_layerstr, optional

Layer on which the component is placed.

Returns:
CfgComponent

The newly created component builder.

Examples

>>> r1 = cfg.components.add("R1", part_type="resistor", enabled=True)
>>> r1.add_pin_pair_rlc("1", "2", resistance="100ohm", resistance_enabled=True)
CfgComponents.clean()#

Clear all components from the list.

CfgComponents.apply()#

Apply all component settings to the EDB design.

CfgComponents.retrieve_parameters_from_edb()#

Read all component settings from the open EDB design.

CfgComponents.get_data_from_db()#

Read all component settings from the open EDB design.

CfgComponents.to_list()#

Serialize all configured components.