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.

Using Application Builder to automate data export

Please login with a confirmed email address before reporting spam

I have a COMSOL simulation in which the solution has been generated and the data I want to export has been setup (what data, filename, etc established in the settings). I have 12 different data sets to export and they take some time to export and I find myself making small changes and need to re-export them so I would like to automate this process. These results have tags "data1", "data2", ..., "data12" in their properties window. I right-clicked on the export object in the model builder menu and copied the code as run which yielded:

model.result().export("data1").run();

So then I wrote up a new method with the following code:

for (int ii=1; ii<12; ii++){ model.result().export(concat("data",toString(ii))).run(); }

Both this code, as well as the first set of code I wrote above, when I click "Test Application", open a blank mph window but do not show any thing else, nor do they write any files to the filenames specified in each data set's settings menu. Can anyone suggest how to automate this process correctly?


0 Replies Last Post Sep 20, 2018, 4:59 p.m. EDT
COMSOL Moderator

Hello Mike Miles

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.

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.