I would like to add an empty / blank line in my configuration file. (.ini file) as below:
I don't have any idea on how to add the empty/blank line.
Could anyone help me on this?
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:
Thanks for the advise.
However, when I put comment, I got symbol ;=""
Can I delete this symbol (;=""), so that I can get the empty/blank line?
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 ;=
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.
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:
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.
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.