Ansys Learning Forum › Forums › Discuss Simulation › Photonics › How to export results from Lumerical for postprocessing using script? › Reply To: How to export results from Lumerical for postprocessing using script?
You can certainly export all of the data in one click. As you suspected, this does require a bit of scripting, but can be done quite simply. First, you can send the whole data set to the scripting workspace:
Then you can export this variable to a file. Probably the simplest route is to use the matlabsave command (matlabsave - Script command – Ansys Optics). Alternatively, you could have your script create other data file types (like CSV) through the use of loops and file operations. For more information about scripting and available commands, please check this link: Lumerical scripting language - By category – Ansys Optics.
In this example, you could simply type matlabsave("data_eport", E); into the script pane to the right to export to a .mat file.