Data logging in UDF
Hi,
I am calculating many parameters in UDF used in transient analysis and I want to plot their graph with respect to time. I am not able to log the parameters in file directly from UDF. I have solved the problem temporarily by 'messaging' it out (printing on screen) and writing transcript file and opening that file in excel. It is very cumbersome and additionally excel has limitation of ~65000 rows. I am sure this is not very difficult problem and might be faced by many. Can anybody send me the UDF script for data logging? Thanks in advance for help. |
Re: Data logging in UDF
FILE *filepointer; /*First you need to define your filepointer*/
filepointer=fopen(filename,"a"); /*next open the file with filename for _a_ppending*/ fprintf(filename,"your-text, %5d\n", your-var); /*output a variable with leading text + newline*/ .... /*output whatever you want*/ fclose(filepointer); /*finally close the file*/ At least for my udf this is doing the job ;) |
Re: Data logging in UDF
Great.. I will check this.
|
All times are GMT -4. The time now is 13:32. |