LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Configuration (INI) example

Solved!
Go to solution

Hi

 

I modified the "Read Configuration (INI)" example to write a new config file if the wanted file does not exsist.

 

But it is not working. I can't figure where I did an error ?

 

It will create an empty file. But nothing else. No errors ether!

 

Regards

 

msskov

 

I'm using LW2013

0 Kudos
Message 1 of 6
(3,859 Views)

Hi msskov,

 

Can you post your file in previous version LabVIEW 2010 or 2012. So I can open the file and solve your query.

Vinal Gandhi, CLA
0 Kudos
Message 2 of 6
(3,846 Views)
0 Kudos
Message 3 of 6
(3,843 Views)

When my ini files are not working the very first thing I check is the spelling of the cluster label. THey must match in the read and write portions of your code.

PaulG.
Retired
0 Kudos
Message 4 of 6
(3,837 Views)
Solution
Accepted by topic author msskov

Working as expected.

The example you use is READING keys. If the key does not exist, the VI returns the default value (from the help of Read Key.vi).

 

So it does not create the section/key, it does not update the file.

 

If you want to create the sections/keys, you have to check if the section/key is already available ("found?" parameter from read key). If so, everything is fine.

If not, you have to call a write key adding that section/key to the INI.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 6
(3,836 Views)

Hi Norbert_B

 

OK. I just misunderstud the descripten then.

0 Kudos
Message 6 of 6
(3,823 Views)