LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with write key VIs (config-file)

Hi
My problem is this: when I use the write key VIs to write to an ini-file, the values are not written/updated in the ini-file. Does
anybody has a solution???

thank YOU!!!
0 Kudos
Message 1 of 5
(3,121 Views)
Check your Close Config Data. It has an input called "write configuration file". The default is false. You need to set it to true to write changes to the file. Hope that helps.
0 Kudos
Message 2 of 5
(3,121 Views)

Hi Dennis, writing key updates or add lines, but the problem is that it also causes all lines to be clumped together, making it unreadable.

 

What's the better way?

 

Clement

0 Kudos
Message 3 of 5
(2,768 Views)

To Original Poster: Be careful about using the Current VI Path function: Why Does My Executable Not Work When Using the Current VI's Path Constant?

 


astroboy wrote:

Hi Dennis, writing key updates or add lines, but the problem is that it also causes all lines to be clumped together, making it unreadable.


By "clumped together" are you referring to linefeeds being removed? Yeah, that's annoying isn't it? Unfortunately, that's what you get with the stock config VIs. 

 

0 Kudos
Message 4 of 5
(2,750 Views)

astroboy wrote:

Hi Dennis, writing key updates or add lines, but the problem is that it also causes all lines to be clumped together, making it unreadable.

 

What's the better way?

 

Clement


 

I was complaining about the poor formatting of the .ini files myself a couple years ago in this thread. http://forums.ni.com/ni/board/message?board.id=170&message.id=273552

 

I found the offending piece of code was buried pretty deep in the Config File VI hierarchy.

 

One idea is to go back after the file is written and find where all the section headers are and insert your own blank lines.

 

Also look at this thread http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=408776

 

You may also want to add kudoes to the config file idea in the Idea board.  http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Comments-in-configuration-file-ini/idi-p/927874#A614 

Message Edited by Ravens Fan on 09-17-2009 10:29 PM
0 Kudos
Message 5 of 5
(2,732 Views)