You can use Configuration File VIs to create, edit, and read Windows configuration settings files (.ini).

The Configuration File VIs use the configuration settings file format.

You can use Configuration File VIs on any platform to read data from and write data to .ini files. Because of this, you can use configuration files to store platform-specific data, like paths, in a platform-independent format. However, you can only use Configuration File VIs to create or modify Windows configuration settings files. You cannot use Configuration File VIs to create or modify configuration files in a macOS or Linux format.

Note The Configuration File VIs support only the ANSI format for Windows configuration settings files.

Refer to the labview\examples\File IO\Configuration (INI)\Configuration (INI) File.lvproj for examples of using the Configuration File VIs.

Note The standard extension for Windows configuration settings files is .ini. but the Configuration File VIs work with files with any extension, provided the content is in the correct format.

A standard Windows configuration settings file is a specific format for storing data in a text file. You can programmatically access data within the .ini file easily because it follows a specific format.

Configuration File Example

Consider a configuration settings file with the following contents:

[Data]
Value=7.2

You can use the Configuration File VIs to read this data, as shown in the following block diagram. This VI uses the Read Key VI to read the key named Value from the section called Data. This VI works regardless of how the file changes, provided the file remains in the Windows configuration settings file format.

Figure 52. Sample Configuration File VI
Block diagram showing Configuration File VIs to read a key from a .ini file.