LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
instrumento

Pretty print .ini files

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

For better of worse we use .ini files to store a bunch of stuff.  For human consumption I like to align the equal signs in a given section like below (only displays properly with non-proportional fonts, obviously):

 

[section]

shortKey        = 1

veryLongKey     = 2

veryVeryLongKey = 3

 

Labview munges this format by removing excess whitespace and I fix this by changing the appropriate VIs in config.llb.  I have one for 7.1 and just had to redo it for 9.01.  Couldn't this be part of standard LV?  Attached is my mod for 9.01 with an "align (T) flag" added to the necessary VI(s) to make it optional, though I made the default not backwards compatible (i.e.. false).   I also like to remove the open and close quote from the values, and don't like to remove the cr/lf from the last line. 

 

The three files in the attached .zip file should overwrite the equally named VIs in vi.lib/utility/config.llb, so be carefull when trying this out, i.e backup your original or don't overwite the NI files by storing somewhere else and linking to them.

 

 

5 Comments
JackDunaway
Trusted Enthusiast
ZIP file not attached... I may be remembering incorrectly, but the Idea Exchange does not allow uploads other than pictures. The alternative is to upload your ZIP to the LabVIEW board and cross-link here.
instrumento
Active Participant

Attached zip file to this equivalent LabVIEW forum thread.

Knight of NI
Frankly, I fail to see the need to do this. It's such an isolated instance that it does not warrant changing the LabVIEW VIs to accommodate something that will be used by maybe one tenth of one percent of programmers.
instrumento
Active Participant

It's such a simple mod that makes the .ini files so much more readable for those one per thousand programmers (and users of programs created by them), but I guess I'll have to keep patching all future versions of LabVIEW installations and upgrades.  Just one more annoyance ...

 

 

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.