04-02-2018 08:46 AM
I'm trying to modify a program that was originally created to be used by a single user so everything has a file path tied to the person. My goal is to change the file paths so that when anyone opens the program the paths will go to their desktop and find a folder there.. My question is what is the best method to make the initial file path be the current users desktop but if they choose that can change this path for the current session?
Solved! Go to Solution.
04-02-2018 09:22 AM - edited 04-02-2018 09:23 AM
Use the Get System Directory VI to get the path to the user's desktop and then write the the Browse Options->Start Path property of the path control.
04-02-2018 09:35 AM
You need to get the actual desktop path. Get System Directory will do that for you.
You need some way to replace the system directory in the paths. I'd use some format like "%DESKTOPDIR%\file.txt", and then use a VI to replace the (optional) "%DESKTOPDIR%" with the actual desktop path.
04-02-2018 12:19 PM
How do I create the first part of your code (I'm very new to labview coding).
04-02-2018 01:02 PM
@daqrookie15 wrote:
How do I create the first part of your code?
Look in the File I/O->File Constants palette.
04-04-2018 03:10 AM
@daqrookie15 wrote:
How do I create the first part of your code (I'm very new to labview coding).
CTRL+space, then type "get system directory" and hit enter.