02-18-2008 07:45 AM
02-18-2008 08:43 AM
You can use standard ANSI C functions to open the file and write to it (fopen / fwrite / fclose). Similar functions can be found in the Formatting and I/O Library (OpenFile / WriteFile / WriteLine / CloseFile). An example of the second type of function can be found in atedemo.prj example (\examples\apps\atedemo folder), while in examples\apps\scopedemo folder you can find an example of standard ANSI C function usage.
I personally prefere to use Formatting and I/O Library functions since I find easier to design error checking routines for them. I know several CVI users tend to use standard file I/O function in seek of better portability and higher code standardization. I suggest you experience some of them and choose your personal solution.
02-19-2008 06:00 PM
Hi tupai,
Unfortunately if you look at the documentation for the ArrayToFile function, it does not allow you to use a string as the datatype of the array elements:
http://zone.ni.com/reference/en-XX/help/370051H-01/cvi/cviarraytofile/
So what you would have to do is write your own implementation of the ArrayToFile function that basically iterates through your string array and writes each string to the file using the ANSI C File I/O commands.
Searching google might be a good first step in implementing your own ArrayToFile function:
http://www.google.com/search?rls=en&q=ansi+c+file+functions