To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to use an INI file to fill in values for a Combo Box.
Description
The Config File VIs palette offers an encapsulated way to read and write to standard INI files. First we will generate a config file to use with these functions. This VI is an example of how this can be done. First it opens up the config file, converts the string array to a single string, writes the data to a specified key, and closes the file.
If you open up the INI file in notepad you see this information.
Now that we have a config file we will use it to populate the values of a Combo Box programmatically. To do this we open the config file, read the data at the correct location, parse the string into an array, write the array to the Strings[] property of the Combo Box, and set the value of the combo box to the first item in the array.
Requirements
Steps to Implement or Execute Code
**This document has been updated to meet the current required format for the NI Code Exchange.**
Description-Separate-2
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
I believe that a better and more robust approach to work with INI file is with the use of the functions in the "Configuration Files VIs" subpalette