LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read a *.cfg file using CVI

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,

0 Kudos
Message 1 of 2
(3,416 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,401 Views)