From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Occasional Nugget 01/30/2014

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?". 🙂

Message 1 of 16
(9,103 Views)

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.

0 Kudos
Message 2 of 16
(9,049 Views)

@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.

0 Kudos
Message 3 of 16
(9,047 Views)

Hi Darren,

 

you might add some VI documentation for the help window. 🙂

 

Thanks anyway!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 16
(9,020 Views)

@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. 😄

Message 5 of 16
(9,003 Views)

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.



Michael Aivaliotis
VI Shots LLC
Message 6 of 16
(8,968 Views)

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.

0 Kudos
Message 7 of 16
(8,956 Views)

@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.

Message 8 of 16
(8,941 Views)

@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.

0 Kudos
Message 9 of 16
(8,915 Views)

@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.

0 Kudos
Message 10 of 16
(8,907 Views)