crossingsymmetry
Subscriber
Hi Thanks for your response. I realized I would get the same answer as your example by selecting the "user selected modes" and it worked beautifully.

However, I run into new issues when I try to select modes for each port and run the simulation through ascript. Following is my script to sweep through TE and TM modes.
for (ii = 1:2){
switchtolayout;
# select modes
select("EME::Ports::port_1"); # select the port group
set("mode selection","user select");
set("selected mode numbers",ii); #mode 2 is TE
select("EME::Ports::port_2"); # select the port group
set("mode selection","user select");
set("selected mode numbers",ii); #mode 2 is
select("EME::Ports::port_3"); # select the port group
set("mode selection","user select");
set("selected mode numbers",ii); #mode 2 is TE
run;
}

However, when I run the simulation for both TE and TM, I get the following error.
Note that I have selected 1 or 2 for ports. The solution seems to be that each time I select a new polarizaiton, I need to press "Select Mode(s)", calculate modes, and then select mode number. Is there a way to do this automatically?
Thanks