01-30-2014 01:38 PM - edited 01-30-2014 01:42 PM
I've posted several nuggets in the past about tokens you can add to your LabVIEW INI file. But during a presentation the other day, somebody asked me where the INI file is located, and I couldn't give a complete answer. Its location is pretty easy to remember on Windows, but what about Mac and Linux? Here's where you can find the LabVIEW INI file (also called the LabVIEW Preferences file) on all three desktop platforms:
Windows
LabVIEW [20xx]\LabVIEW.ini
Mac
[user 'Library' folder]: Preferences:LabVIEW.app [20xx] Preferences
Linux
[user folder or 'root']/natinst/.config/LabVIEW-[20xx]/labview.conf
If you want to programmatically retrieve the LabVIEW INI file path on your system, you can call the VI I've attached to this post. It works in LabVIEW 8.0 and later on all desktop platforms. I hope this nugget post eventually bubbles up in a google search for "Where is the LabVIEW INI file?". 🙂
01-30-2014 01:57 PM
I'm sure you knew this would be asked, but why does this VI need to be password protected? Is this using private methods? I assume that these paths could be found using standard LabVIEW functions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-30-2014 01:58 PM
@Hooovahh wrote:
why does this VI need to be password protected? Is this using private methods?
It calls a private VI Server property to obtain the INI file path. I'm gonna see if I can get that property moved to public in a future LabVIEW version.
01-30-2014 02:16 PM
01-30-2014 02:23 PM
@Darren wrote:
Windows
LabVIEW [20xx]\LabVIEW.ini
Just a reminder that this is machine-wide, and not per user, making things tricky if there are several regular users.
There are some good ideas ideas to move it to the user hierarchy or even move it to the cloud. 😄
01-30-2014 02:41 PM
After you've found the ini, how do you decode the contents? What do the ini entries mean?
There is a LabVIEW ini resource located on the LabVIEW WIki here:
http://labviewwiki.org/LabVIEW_configuration_file
If anyone knows of some information that's missing there, feel free to contribute.
01-30-2014 02:50 PM
Editing the ini file is ri-g@$%@#$n-diculous in my book. There are two better options IMO which should be made available.
1) Private methods to get/set keys should be made public (or at least wrappers). Add method to get the names of available keys in the file.
2) There should be a page in the Options window to set and view arbitrary keys. I use a simple two column table, works great.
01-30-2014 02:58 PM
@Darin.K wrote:
Private methods to get/set keys should be made public (or at least wrappers).
We have an API for reading/writing tokens in the LabVIEW INI file. See here: resource\dialog\lvconfig.llb
I'm going to try to add the 'get path' VI I attached above to this LLB in LabVIEW 2014.
01-30-2014 03:42 PM
@Darren wrote:
@Darin.K wrote:
Private methods to get/set keys should be made public (or at least wrappers).
We have an API for reading/writing tokens in the LabVIEW INI file. See here: resource\dialog\lvconfig.llb
I'm going to try to add the 'get path' VI I attached above to this LLB in LabVIEW 2014.
That API requires the path, and I presume is a wrapper around a CLFN back into LV. The invoke node I use does not require the path, presumably because LV must know which path it has already used. It just felt cleaner to me when I wrote my own options window.
01-30-2014 03:46 PM
@Darin.K wrote:
That API requires the path, and I presume is a wrapper around a CLFN back into LV. The invoke node I use does not require the path, presumably because LV must know which path it has already used. It just felt cleaner to me when I wrote my own options window.
Nope, doesn't require a path to the INI file. Just the name of the token you want to get/set.