create_touchstone_component_multi#

TwinBuilderComponents.create_touchstone_component_multi(component_name: str, num_ports: int, array_name: str, array_id_name: str, files: list, location: list | None = None, page: int = 1, angle: int | float = 0.0, flip: bool = False) CircuitComponent#

Create an N-port multi-component by importing touchstone files.

Parameters:
component_namestr

Name of the component to create.

num_portsint

Number of ports or transmission lines.

array_namestr

Name of the array variable. It must start with the $ symbol as it defines a project variable.

array_id_namestr

Name of the array ID variable. It must start with the $ symbol as it defines a project variable.

fileslist

List of touchstone file paths to import.

locationtuple, optional

Tuple of (x, y) coordinates for component location. If None, default location is used. Default is None.

pageint, optional

Schematics page number. Default is 1.

angleint or float, optional

Rotation angle in degrees. Default is 0.0.

flipbool, optional

Whether to flip the component. Default is False.

Returns:
ansys.aedt.core.modeler.cad.object_3dcircuit.CircuitComponent

Component object.

>>> :obj:`from` :obj:`ansys.aedt.core` :obj:`import` :obj:`Circuit`
    ..
>>> :obj:`aedtapp` = :obj:`Circuit`\()
    ..
>>> :obj:`ts` = ["path_to_file1.ts", "path_to_file2.ts"]
    ..
>>> :obj:`c` = :obj:`aedtapp.modeler.schematic.create_touchstone_component_multi`\(
    ..
… component_name=”nport”,
… num_ports=4,
… array_name=”$SElement”,
… array_id_name=”$SElement_id”,
… files=[ts[0], ts[1]],
… )