Script command for "Export to INTERCONNECT" in MODE?


#1

Is there a way to export a waveguide model from MODE Solutions to INTERCONNECT through a script function?

Say you write a script for creating several waveguides and you want to export a model for each of them to INTERCONNECT. Is it possible to do this using a script?


#2

@fgomez, It is possible to do so. However, if you want to do the whole process by using script, you will still have to use the command lines to open up and close the project files. Presumably you have the following 4 files in the same directory and already navigated to this directory, then type in the following command lines in the prompt window: waveguide_mode.lms (233.0 KB) waveguide_mode.lsf (302 Bytes) waveguide_interconnect.icp (96.3 KB) waveguide_interconnect.lsf (319 Bytes)

“C:\Program Files\Lumerical\MODE\bin\mode-solutions.exe” waveguide_mode.lms -run waveguide_mode.lsf
"C:\Program Files\Lumerical\INTERCONNECT\bin\interconnect.exe" waveguide_interconnect.icp -run waveguide_interconnect.lsf

The first command line will open up MODE Solutions and run the script file “waveguide_mode.lsf”. In this script file, the mode profile of the waveguide is saved to a Lumerical data file “wgd.ldf” to the same directory.
Then the second command line will open up INTERCONNECT and run the script file “waveguide_interconnect.lsf”. In this script file, the wgd.ldf file is imported to the MODE Waveguide element.

Some useful script commands used in the script files:
setanalysis
frequencysweep
copydcard
savedcard


#3

@fgomez, I just found out another way of doing this, without the need of going to the command prompt window. Download this script file run_commands.lsf (221 Bytes) , and save it to the same directory as the other files, the command lines can be run in this script file.

But please note that, the path stated in this script file need to be changed according to your real case. Say, change the “C:\temp” path to the path you use in your computer in the following line.
system(’"“C:\Program files\Lumerical\MODE\bin\mode-solutions.exe” -run “C:\temp\waveguide_mode.lsf”"’);

One useful script command:
system