Error: there was an error updating the mode profiles of the following mode sources

modesourcescript

#1

Hi, I am trying to select a higher order mode for my mode source using the scripting language. I get the following error when I use this code. Error: there was an error updating the mode profiles of the following mode sources

addmodesource;

set(“mode selection”,“user select”);
findmodes;
selectmode(“mode3”);


How to select special mode by script in VarFDTD
ModeExpansionMonitor for polarization mode conversion
#2

Hi,

The “findmodes” command is meant to be used with the FDE solver in MODE Solutions. To select a specific mode number in a mode source, you can use the “updatesourcemode” script command:
https://kb.lumerical.com/en/index.html?ref_scripts_updatesourcemode.html

For example, the following code should work to select the 3rd mode in the mode list:

addmodesource;
set("mode selection","user select");
updatesourcemode(3);

Hopefully this helps!