Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Exporting plots from parametric sweep with variable filenames

Please login with a confirmed email address before reporting spam

Hi,

I'm running a large parametric sweep over a variable - let's call it 'a.' There's a 1D plot that I've defined in "Results," and for each of the runs in the parametric sweep, I'd like to automatically export the plot in a file named something like "plot'a'.txt." Since there are a lot of different plots for the different values of 'a', this would be difficult to do manually. Does anyone have any suggestions on how to do this?


2 Replies Last Post 26.09.2019, 07:59 GMT-4
COMSOL Moderator

Hello Henry Shackleton

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 5 years ago 01.07.2019, 20:36 GMT-4
Updated: 5 years ago 01.07.2019, 20:30 GMT-4

Right click on Results->Export and select "plot". Then set up the new node to point to the image you want to export. To export it automatically then right click on Your_study->Job_Configuration->Sequence and select Results->Export_to_file. In the settings for this under File->Add_parameters_to_filename select "Parameter name and value." It will now export each image with the parameter value appended to the filename. This can generate very long filenames though, so in some cases you might want to use the "Index" value instead.

Right click on Results->Export and select "plot". Then set up the new node to point to the image you want to export. To export it automatically then right click on Your_study->Job_Configuration->Sequence and select Results->Export_to_file. In the settings for this under File->Add_parameters_to_filename select "Parameter name and value." It will now export each image with the parameter value appended to the filename. This can generate very long filenames though, so in some cases you might want to use the "Index" value instead.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 26.09.2019, 07:59 GMT-4

Thank You Matthew Parry.

Thank You Matthew Parry.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.