Problem
What should I be aware of when using Switch Views on schematics with PORT_NAME elements?
Solution
With PORT_NAME elements, unexpected simulation results can occur when using Switch Views if schematic connectivity is not fully understood. A simple example is included in the Downloads section of this article to show how to work around this potential problem.
The thing to keep in mind when using Switch Views of schematics with PORT_NAME elements is that connectivity is determined by the following logic:
On the Default view, find the PORT_NAME with the specified Name parameter of the terminal.
Get the Port Number (secondary parameter "P") of the PORT_NAME element.
In the specified switch view, find the PORT_NAME with that Port Number.
In other words, if you have a PORT_NAME in both the Default and Switch View with the same Name parameter, the secondary parameter "P" must also be the same or the connectivity will be incorrect. You will need to select the Show Secondary button in Element Options to view the Port Number parameter for a PORT_NAME element. The simplest way to ensure that this will be the case when creating a Switch View is to make the view by copying the Default view. All the ports in the copied document will have the correct names/numbers.