Please login with a confirmed email address before reporting spam
Posted:
6 years ago
14.01.2019, 12:40 GMT-5
Updated:
6 years ago
14.01.2019, 12:41 GMT-5
If you need to save some data to some .txt file you must use this code:
String data = "Some data which need to save";
writeFile("temp:///my_data.txt", data);
fileSaveAs("temp:///my_data.txt");
Firstly, you should write the data you want to save in the string (line 1);
Secondly, you shoud choose the format to save the data (in my case I chose .txt). Then select the default name of file (in my code it's mydata); When you run the command "fileSaveAs" comsol will open the save data dialog box.
N.B. in my case, Introduction to application builder (from comsol installation directory) did not contain this information. But in internet here's more detailed manual.
If you need to save some data to some .txt file you must use this code:
> String data = "Some data which need to save";
>
> writeFile("temp:///my_data.txt", data);
>
> fileSaveAs("temp:///my_data.txt");
Firstly, you should write the data you want to save in the string (line 1);
Secondly, you shoud choose the format to save the data (in my case I chose **.txt**). Then select the default name of file (in my code it's mydata); When you run the command "fileSaveAs" comsol will open the save data dialog box.
**N.B.** in my case, Introduction to application builder (from comsol installation directory) did not contain this information. But in internet [here's more detailed manual](https://cdn.comsol.com/documentation/5.4.0.246/ApplicationProgrammingGuide.zh_CN.pdf).