From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-13-2009 10:06 PM
Hi,
I would like to add an empty / blank line in my configuration file. (.ini file) as below:
[H1]
key1=1
[H2]
key2=2
I don't have any idea on how to add the empty/blank line.
Could anyone help me on this?
05-13-2009 10:09 PM
You could use a text editor (like notepad).
Now, if you are going to write to it with LabVIEW, I would suggest a comment line instead of a blank line. Comments are after ; (but don't use it on the same line as text or it will think it's part of the text.
In other words:
[H1]
key1=1
;
[H2]
05-13-2009 10:23 PM
Thanks for the advise.
However, when I put comment, I got symbol ;=""
[H1]
Key1=1
;=""
[H1]
Key2=2
Can I delete this symbol (;=""), so that I can get the empty/blank line?
05-13-2009 10:25 PM
Forgot about that. Same thing happens to me. I just never bothered trying to figure out a way to get rid of it.
I suppose if you were really ambitious, you could close the file, read each line back and eliminate all of the lines that start with ;=
05-13-2009 10:53 PM
Sometime ago I was complaining about the very same thing. http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=273519#M273519
I made a modification to the NI library to add the blank line. Several people pointed out to me that modifying the library file was a bad idea. I'm sure my modifications I made are now lost as I have upgraded LV a few times since then.
But perhaps if you made those modifications and save the entire library under a new name, store it in a safe place for user files, you could use the the modified library to write blank lines between sections.
I put in a product suggestion, but I don't know if anything will come of it. I would recommend that you put in a product suggestion as well.
05-14-2009 01:51 AM
I would like to add an empty/blank line for more than two line. Therefore, I try to write the comment (;) a few time in the same group.
However, I unable to do it.
Below is what I'm trying to get:
[H1]
K1=1
;
;
;
[H2]
K=2
05-14-2009 04:29 AM
Hello All,
I made a test-VI, which does what you want. But as you can see, when you open/close the Config file with theConfig File VIs (run "Step 2" in Test-VI), the blank lines are always removed. You have to consider this.
Greets, dave
02-01-2010 09:21 PM
I just noticed something that I believe was added in LV 2009, but I could not find a mention of it in the What's New and changed section of the help file
It appears that the configuration files now add blank lines between the sections.
There were some comments about other improvements to the Config File I/O VI's such as only writing out the configuration file if it has actually changed.
Thanks for improving this in LV 2009. It greatly improves the readability of the the config files that are created.
02-01-2010 09:54 PM