You can use
Application Directory.vi and directly build the desired file's path, as can be seen in the following snippet:
Alternatively, you can use
Current VI's Path
in LabVIEW to return the path of the calling VI. Then, by using
, you can programmatically construct the file path for the other file. Refer to the following steps for creating code to programmatically set a filepath.
Current VI's Path on the block diagram. This function can be found in the Functions palette at Programming»File I/O»File Constants.
Strip Path and
Build Path on the block diagram. Both can be found in the Functions palette at Programming»File I/O.
- Wire the diagram as shown below.