Mars Su Posted October 14, 2010 Report Share Posted October 14, 2010 Hello everyone, Please take a look at the enclosed image. How could I get the file path value in case "True"? (Case "True" description: there is no path input to "Read from Text file", a dialog box will pop up for selecting file. I want to get the path value and pass it back to the file path control on front panel. ) Thanks in advance Quote Link to comment
ned Posted October 14, 2010 Report Share Posted October 14, 2010 If you use the Close File function, the output is the path to the file. Quote Link to comment
Phillip Brooks Posted October 14, 2010 Report Share Posted October 14, 2010 Hello everyone, Please take a look at the enclosed image. How could I get the file path value in case "True"? (Case "True" description: there is no path input to "Read from Text file", a dialog box will pop up for selecting file. I want to get the path value and pass it back to the file path control on front panel. ) Thanks in advance You might consider using the function "Check if File or Folder Exists" instead. The path may not be empty, but that doesn't mean the file exists. Use the file or folder exists? output to control your case statement and use the dup path for the read file function. Quote Link to comment
Mars Su Posted October 14, 2010 Author Report Share Posted October 14, 2010 (edited) If you use the Close File function, the output is the path to the file. Yes, that's it. Thanks. How could I ignored "close file" You might consider using the function "Check if File or Folder Exists" instead. The path may not be empty, but that doesn't mean the file exists. Use the file or folder exists? output to control your case statement and use the dup path for the read file function. Thanks. "Check if File or Folder Exists" does avoide the VI to open unexist file, but it couldn't deal with empty path. So I combied both "Check if File or Folder Exists" and "Empty string or path". Edited October 14, 2010 by Mars Su Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.