create_port_on_pins#

Components.create_port_on_pins(refdes, pins, reference_pins, impedance=50.0)[source]#

Create circuit port between pins and reference ones.

Parameters:
refdesComponent reference designator

str or EDBComponent object.

pinspin name where the terminal has to be created. Single pin or several ones can be provided.If several
pins are provided a pin group will is created. Pin names can be the EDB name or the EDBPadstackInstance one.
For instance the pin called ``Pin1`` located on component ``U1``, ``U1-Pin1`` or ``Pin1`` can be provided and
will be handled.

str, [str], EDBPadstackInstance, [EDBPadstackInstance]

reference_pinsreference pin name used for terminal reference. Single pin or several ones can be provided.
If several pins are provided a pin group will is created. Pin names can be the EDB name or the
EDBPadstackInstance one. For instance the pin called ``Pin1`` located on component ``U1``, ``U1-Pin1``
or ``Pin1`` can be provided and will be handled.

str, [str], EDBPadstackInstance, [EDBPadstackInstance]

impedancePort impedance

str, float

Returns:
EDB terminal created, or False if failed to create.
Example:
>>> :obj:`from` :obj:`pyaedt` :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`\()
    ..