Creating a Multi-File N-Port Model
Instead of referencing a single file, an N-port model can reference an array of solution files, using a project array variable. For instance, the following can be used to specify the File name:
- +$ModelNames[1]
- +$ModelNames[$ModelNames_Index]
$ModelNames is a project level array variable and $ModelNames_Index is a project level array index variable.

For more information, see Adding a Project Variable Array.
To create a multi-file model using array variables:
- View the Component Libraries area, select the Symbols tab. Click Import Models.
- Select the NPort_Multi icon. This
opens the N-port multi file import window.

- Enter a number of pins or ports (from 1 to 1000). Files containing components with exactly the specified number of pins (and only those files) are displayed for selection in the Add Files window.
- Enter a Name for the model if chosen.
- Select a type for the Reference node:
- Implied reference to ground: the global ground is the reference port for each N port connection. Its voltage is always 0V.
- Common reference port: an additional reference pin is added that is a common reference for the definition of port voltages. This reference can have any voltage and corresponds to the net for that extra pin.
- Add individual hidden reference pin per port: an additional reference pin is added for each port. These reference pins are hidden, set to 0V by default, and can each have their own reference voltage. You can connect each reference pin to its own net. Select this option if you do not want to see the reference pins.
- Add individual reference pin per port: an additional reference pin is added for each port. Every reference pin can have its own reference voltage and be connected to its own net.
See Reference Nodes on S-Parameter Elements in the S-parameter Technical Notes for how the Circuit solver handles reference node configurations.
- Clicking Add Files to browse and select multiple Touchstone (*.SnP) files to be added to the list box.
- Click OK. An instance of the N-port component is attached to the cursor, so drag and place it in the schematic. When instances of the component are placed, right-click and select Finish or press Esc on the keyboard to stop placing instances.
- The simulation can sweep the entries in the created Text Array Variable. In this case, $SElement_Files_Index is the variable to sweep.