Example Code

Recent Files

Code and Documents

Attachment

Overview

Provides a mechanism for selecting a new file or quickly accessing a previously opened file. Useful for quickly selecting config/sequence files.

Description

The example VI "Recent Files - Example", shown below, calls a sub VI called "Recent Files", which is used to store a list of recently opened files plus the currently open file in an INI.

A combo box is used to allow the user to enter a new file name or select from a list of previously opened files. The "Browse" button is used to select a new file, the "Open" button displays the contents of the file and also adds it to the recent file list. When the VI is first run the list is automatically populated and the combo control is set to the last file opened.

ScreenShot.jpg

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors