05-13-2010 11:45 AM
Hello,
I want to open a *.cfg file using cvi. I opened it with Notepad and it looks something like this.
end y-pos
1
OCT/FLIM Sampling
10
FLIM Averaging
20
ko
1275684.95765 1275520.49861 1275356.07694 1275191.69269 1275027.34588 1274863.0365
Pecent of Saturation
0.0 0.0 0.0 0.0 0.0 0.0
For example, I would like to get a buffer with all values after "ko" tag and in other buffer values afer "Pecent of Saturation"
Is there a function in CVI to do this? I tried with iniFile functions but the file has not "sections". I guess the file uses tab as a column sepatator for each data.
Thanks,
05-13-2010 02:12 PM
There is no native function that can read this file format: you will need to develop your own function to open and read the file.
You options are to use ANSI C functions (fopen, fgets and so on) or CVI Formatting and I/O Library equivalent (OpenFile, ReadLine/ScanFile and so on). Both options are feasible to read such files.