how do i get (text) File I/O VI's to prompt only ONCE for a filepath and then use that from then on?
if i leave FilePath unwired, (because i want the user prompted) i get prompted for file location on EACH ITERATION, even with "Append" wired True. that is, the data is being appeneded, but it constanly brings up the file dialogue box.
i want it to come up only the first time upon program execution.
Put a shift register on the loop containing the file write function. Connect the left shift register node to the file path input to the write vi. Connect the file path output from the write vi to the right shift register node. Do NOT initialize the shift register.
The first time you run the vi, the shift register will contain an empty path and so prompt you for a file to write. The path to the resulting file will be put into the shift register so the 2nd time through the loop the routine won't ask for a file name.
Mike...
Certified Professional Instructor Certified LabVIEW Architect LabVIEW Champion
Also it's possible to use local variables. They are useful when you don't use loops, but need to save data in several places of your code. In this case the default value of your path variable must be "Not a path" if you want to get prompt first.
I had this exact problem not too long ago. I don't know how elegant this solution is, but I simply added another while loop around my main program and the user prompt.