:class:`CfgSpiceModels` ======================= .. py:class:: pyedb.configuration.cfg_spice_models.CfgSpiceModels(pdata=None, data=None, path_lib=None) Collect SPICE model assignments for serialization. .. !! processed by numpydoc !! .. py:currentmodule:: CfgSpiceModels Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~to_list` - Serialize all SPICE models to a list of dictionaries. * - :py:attr:`~get_data_from_db` - Read SPICE model assignments from EDB by inspecting components. * - :py:attr:`~add` - Add a SPICE model assignment. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~path_libraries` - * - :py:attr:`~models` - Import detail ------------- .. code-block:: python from pyedb.configuration.cfg_spice_models import CfgSpiceModels Attribute detail ---------------- .. py:attribute:: path_libraries :value: None .. py:attribute:: models Method detail ------------- .. py:method:: to_list() Serialize all SPICE models to a list of dictionaries. .. !! processed by numpydoc !! .. py:method:: get_data_from_db(cfg_components) Read SPICE model assignments from EDB by inspecting components. Groups components that share the same SPICE model (by model name, component definition, file path, and sub-circuit) into a single ``spice_models`` entry suitable for round-trip export. :Parameters: **cfg_components** : :class:`python:list` :obj:`of` :class:`python:dict` Per-component dictionaries already retrieved by :class:`CfgComponents.retrieve_parameters_from_edb`. Components assigned a SPICE model carry the data under the ``spice_model`` key. :Returns: :class:`python:list` :obj:`of` :class:`python:dict` JSON-serializable SPICE model assignment entries. .. !! processed by numpydoc !! .. py:method:: add(name: str, component_definition: str, file_path: str, sub_circuit_name: str = '', apply_to_all: bool = True, components=None, terminal_pairs=None) Add a SPICE model assignment. .. !! processed by numpydoc !!