Use API to call other programs




I am trying to use API to call FDTD from INTERCONNECT, but run into some problem. When I try to send a variable to workspace, I got an error. Can anybody help? Code and error are attached. I am using the latest version of Lumerical tools.

Thank you very much


Using Lumerical's API on Mac OS X


For the moment, we have workaround for this error. We can define the path of the Lumerical API in your user profile. But we will have to run FDTD or INTERCONNECT from a terminal window. Try the following:

  • Open a Terminal window and type this command:
    nano .bash_profile
  • Append the following commands:
    export PATH=/Applications/Lumerical/FDTD\ Solutions/FDTD\$PATH
    export PATH=/Applications/Lumerical/MODE\ Solutions/MODE\$PATH
    export PATH=/Applications/Lumerical/DEVICE/$PATH
    export PATH=/Applications/Lumerical/INTERCONNECT/$PATH
  • Quit and save
  • Run the following:
    source .bash_profile
  • Test the path:
    printf "%s\n" $PATH
  • Open and launch INTERCONNECT by:
  • You should be able to open a session of FDTD from INTERCONNECT and vice-versa.

Using Lumerical's API on Mac OS X