Photonics

Photonics

Export .jpg figures with script commands

    • Evangelia Chatzianagnostou
      Subscriber

      Hello,
      i would like to ask you if it is possible in MODE solutions to export and save figures in jpg or png format from the Visualizer with the use of script commands without using the GUI buttons in the Visualizer. I am using the following script and I am searching for an extra command in order to export the E field distribution in jpg format.

       

      Thank you!

      switchtolayout;
      run;
      runanalysis;
      setanalysis("number of trial modes",20);
      setanalysis("use max index",0);
      setanalysis("n",2.4);
      findmodes;
      results = getresult("mode1","E");
      material = getresult("material","index");

      visualize(results,material);

    • Amrita Pati
      Ansys Employee

       

      Hi Evangelia,

      You won’t be able to use scripting to export the E field distribution directly from visualizer. You would need to use the plot/image commands that generate 1D/2D plots. These script commands open up the figure windows. You can export the figure from the windows using the exportfigure command. 

      Please refer to the following links for more information on these commands:

      1. plot
      2. image
      3. exportfigure

      Regards,
      Amrita

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.