Configuration File VIs

Owning Palette: File I/O VIs and Functions

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Configuration File VIs to create, modify, and read a platform-independent configuration file.

Example

Note
  • You cannot include comments or any other information in a key string.
  • You can use the Configuration File VIs for Windows configuration settings files only in the ANSI format.
Palette ObjectDescription
Close Config DataWrites data to the platform-independent configuration file identified by refnum and then closes the reference to that file.
Get Key NamesGets the names of all keys in the specified section from the configuration data identified by refnum.
Get Section NamesGets the names of all sections from the configuration data identified by refnum.
Not A Config Data RefnumDetermines whether a configuration data refnum is valid.
Open Config DataOpens a reference to the configuration data found in a platform-independent configuration file.
Read KeyReads a value associated with a key in a specified section from the configuration data identified by refnum. If the key does not exist, the VI returns the default value. This VI supports multibyte characters in strings. Wire data to the default value input to determine the polymorphic instance to use or manually select the instance.
Remove KeyRemoves a key in a specified section from the configuration data identified by refnum.
Remove SectionRemoves a section from the configuration data identified by refnum.
Write KeyWrites a value to a key in a specified section of the configuration data identified by refnum. This VI modifies data in memory. To write data to disk, use the Close Config Data VI. Wire data to the value input to determine the polymorphic instance to use or manually select the instance.

Example

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

 Open example  Find related examples