String and Path Controls and Indicators

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Use string controls and indicators to enter or display text. Use path controls and indicators to enter or display file or folder paths.

Pass new or changed values to the block diagram from a string or path control during run time by clicking outside the text field. By default, LabVIEW waits until you perform this action to interpret the new values. You can update the string value as you type by right-clicking a string control and selecting Update Value while Typing from the shortcut menu. You can also use the Update While Typing? property to update the value programmatically.

Note  The availability of string and path controls and indicators may vary depending on the subpalette style you choose. Refer to the Modern, NXG Style, Silver, System, or Classic subpalette for string and path control and indicator availability.

String Controls and Indicators

Right-click a string control or indicator to change the string display type and behavior, such as password display or hex display. You can also use VIs and functions from the File I/O palette to pass strings to an external file, such as a text file or spreadsheet.

Related Information

Configuring String Controls and Indicators

Formatting Strings

Grouping Data with Strings

Combo Box Controls

Use combo box controls to create a list of strings you can cycle through, such as a pull-down menu. Combo box controls are different from ring and enum controls because they output data as strings instead of numerics.

Note  As you type a string in a combo box control at run time, LabVIEW selects the first, shortest string in the control that begins with the letters you type. If no strings match the letters you type and the control does not allow undefined string values, LabVIEW does not accept or display the letters you type in the control.
Tip  Press the <Up> and <Down> arrow keys to cycle through combo box values.

Related Information

Editing Items in Combo Box Controls

Specifying Custom Values for Combo Box Strings

Selecting and Entering Strings in Combo Box Controls at Run Time

Path Controls and Indicators

You can drag a path, folder, or file from (Windows) Windows Explorer or (macOS) the Finder and place it in a path control if dropping is enabled.

Note  Dropping is enabled by default. To disable dropping, right-click the path control and select Advanced»Allow Dropping from the shortcut menu.

Path controls and indicators work similarly to string controls and indicators, but LabVIEW formats the path using the standard syntax for the platform you are using.

Invalid Paths

If a function that returns a path fails, the function returns <Not A Path> in the indicator. Use <Not A Path> as the default value for a path control to detect when the user fails to provide a path and display a file dialog box with options for selecting a path. Use the File Dialog Express VI to display a file dialog box.

Empty Paths

Use empty paths to prompt the user to specify a path. An empty path appears as an empty string on Windows and macOS 32-bit and as a slash (/) on Linux and macOS 64-bit. (Windows) When you wire an empty path to a file input/output (I/O) function, the empty path refers to the list of drives mapped to the computer. (macOS) The empty path refers to the mounted volumes. (Linux) The empty path refers to the root directory.

Absolute and Relative Paths

A relative path describes the location of a file or directory relative to an arbitrary location in the file system. An absolute path describes the location of a file or directory starting from the top level of the file system. Use relative paths in VIs to avoid having to rework the paths if you build an application or run the VI on a different computer.

Related Information

File Paths

Configuring Browse Options of Path Controls

Changing the Value of a Path Control


Not Helpful