Этот контент недоступен на выбранном вами языке.

Содержимое отображается на другом доступном языке. Ваш браузер может включать функции, которые могут помочь перевести текст.

Combining a User-Created .ini File with LabVIEW.ini for Distribution

Updated Dec 2, 2019

Reported In

Software

  • LabVIEW Application Builder Module
  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

I have a LabVIEW VI that I have built into an application. By default, LabVIEW creates an .ini file which has the same name as the executable [Executable Name].ini to store the LabVIEW environmental settings for distribution, as shown in the photo below. I also have my own custom configuration file, which I would like to combine with the default LabVIEW .ini file. Is there a method for combining the two files?

Solution

You can use Application Builder to combine your custom .ini file with the default [Executable Name].ini file into a single .ini file. You must have your custom .ini file saved in the project in order to add it, as shown in the photo below.



Next, follow the steps below to accomplish combining the .ini files.
 
  1. Right-click on your executable build specification and select Properties.
  2. In the properties window, select the Advanced category.
  3. LabVIEW 2010 and later: Check Use Custom Configuration file Prior to LabVIEW 2010: Uncheck the box next to Use the default LabVIEW Configuration file (LabVIEW.ini)

4. In the Select Project File dialog, either select the custom .ini file if it is in your project or click Add... to browse for it.
5. If you are using Configuration File I/O VIs from the palette below:

Ensure that all of your configuration file accesses within your application point to the new location which is at the same level as the executable, as shown below:
 
6. Rebuild the application.
7. Note the name of the [Executable Name].ini file generated from the build. You might need to rename the file generated to match the name of the .ini file referenced by your LabVIEW code in the Open Config Data.vi as shown above. After renaming the [Executable Name].ini file generated, the final result should look like this: 

Additional Information

On the deployed machine, the custom .ini file and the executable must be located at the same level in the directory structure because this is the default location where LabVIEW searches for the .ini. If LabVIEW cannot find it in this location it will auto-generate a new .ini file and your environmental settings will be lost.

WAS THIS ARTICLE HELPFUL?

Not Helpful