This article shows how to configure Lumerical for use with the inter-product API feature. This feature is built into all Lumerical products and does not require an additional license.
Windows configuration
This is configured during the product installation. No further configuration is required.
Linux configuration
NOTE: The configuration shown is for supported Linux systems with gnome-terminal running the bash shell.
- Adding a Lumerical product's installation path to the system path allows you to start any product, by typing the product executable in your Terminal without having to specify the full path.
- Change directory to your local folder, '~/' or '/home/USERNAME/'
$ cd ~
$ vi .bash_profile - Edit/append your [[.bash_profile]] file with the following lines. (default install path shown)
PATH=/opt/lumerical/[[verpath]]/bin:$PATH
export PATH - Save and close the editor.
- Quit Terminal or disconnect your current session.
- Reconnect or open Terminal.
- Typing the 'launcher' or the 'product executable' should open the launcher or product's IDE (respectively).
$ launcher
OR
$ fdtd-solutions &
$ mode-solutions &
$ device &
$ interconnect & - You should be able to launch and another Lumerical product from within the 'Script prompt.'
> opensession('mode')
macOS configuration
[[NOTE]]: Run Lumerical using the Terminal on macOS. The API does not work when Lumerical is run from the LaunchPad or Finder.
- Open Terminal
- Add the Lumerical installation path to your current shell. (i.e. All products added to path)
export PATH=$PATH:/Applications/Lumerical\ [[verpath]].app/Contents/Applications/FDTD\ Solutions.app/Contents/MacOS
export PATH=$PATH:/Applications/Lumerical\ [[verpath]].app/Contents/Applications/MODE\ Solutions.app/Contents/MacOS
export PATH=$PATH:/Applications/Lumerical\ [[verpath]].app/Contents/Applications/DEVICE.app/Contents/MacOS
export PATH=$PATH:/Applications/Lumerical\ [[verpath]].app/Contents/Applications/INTERCONNECT.app/Contents/Mac$ fdtd-solutions &
$ mode-solutions &
$ device &
$ interconnect & - You should be able to launch and open other Lumerical product applications from any Lumerical product when these are executed from your current shell/terminal window.
Note: Do not close or terminate your current shell/Terminal. Once you close the current shell/terminal window, you will have to run the above export commands again on your new shell/Terminal. To permanently add PATH to your shell profile, check out this article. |