CfgComponents#
- class pyedb.configuration.cfg_components.CfgComponents(pedb=None, components_data=None)#
Fluent builder for the
componentsconfiguration list.
Overview#
Return a |
|
Add a component configuration entry. |
|
Clear all components from the list. |
|
Apply all component settings to the EDB design. |
|
Read all component settings from the open EDB design. |
|
Read all component settings from the open EDB design. |
|
Serialize all configured components. |
Import detail#
from pyedb.configuration.cfg_components import CfgComponents
Method detail#
- CfgComponents.get(reference_designator: str) CfgComponent#
Return a
CfgComponentfor 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 previousget()call, the cached entry is returned instead of creating a duplicate.- Parameters:
- reference_designator
str Reference designator of the component to retrieve, e.g.
"U1".
- reference_designator
- Returns:
CfgComponentComponent builder pre-populated with current EDB properties.
- Raises:
KeyErrorIf 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_designator
str Unique component reference designator (e.g.
"U1").- part_type
str,optional Component type. Accepted values:
"resistor","capacitor","inductor","ic","io","other".- enabledbool,
optional Whether the component is enabled in the simulation.
- definition
str,optional Component part definition name.
- placement_layer
str,optional Layer on which the component is placed.
- reference_designator
- Returns:
CfgComponentThe 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.