LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Comment lire un chiffre d'une ligne de fichier ini?

Bonjour,

J'ai une fichier ini qui contient une section et un ligne. Je veut lire un chiffre (exp 9) de ce ligne et l'affiche dans un champ texte.

exp;

[SIGNAL]

PRESENCE_1:        1:    9:    0:    1:    0:

 

Merci à votre aide.

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

CVI offers you inifile instrument to read / write .INI files: you must load the instrument into Instrument menu if you haven't done it already. If you don't know this instrument you can find it in <cvidir>\toolslib\toolbox directory. I suggest you to read the online help and see the related example that comes with CVI.

 

Supposing you are reding the line with Ini_GetStringIntoBuffer () you can scan the line read to obtain desired text.

Scanning the line is quite easy if you rely on separators: you can either use strtok () or Scan () function to easily extracd desired value from the line.



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,133 Views)