LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comments in INI File Revisited

I've looked over the previous posts about supporting comments in INI files, but I never really saw any definitive solution.  I'm surprised with so many people asking for something as basic as this, that NI never came through (like not having a groupbox, but that's another gripe!).  Has anyone ever found a freely available VI to do this?

Thanks in advance!
Derek
0 Kudos
Message 1 of 4
(3,580 Views)

Derek,

There is no simple VI to do this.  Strings and paths you have to strip out the comment manually.  For floats, ints, and Booleans it does get striped out automatically.  I believe that the Read VIs should automatically strip out any comments to the right of any ";".  The semicolon is the Windows standard character for commenting an INI file.  I have attached some code and an INI file that you can look at and change if needed to fit your application.  Bet of all, it is free to use as you want.  Download both to your local disk and put the files in the same directory.

Hope this helps,

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
Download All
0 Kudos
Message 2 of 4
(3,543 Views)

Aother way of storing 'ini' data with comments and more is the conversion to xml  Smiley Happy

Think of a cluster containing your comments and data, changing values is not that easy, however to just have a readable  look at settings.. and storing structures (cluster) is easy 

Backdraft: by manual changes you can corrupt the structure and can't read it back, ini is more robust..

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Download All
0 Kudos
Message 3 of 4
(3,537 Views)
Thanks - these look promising!  I think I'll spend some time next week playing with these.

Happy Holidays!
Derek
0 Kudos
Message 4 of 4
(3,520 Views)