LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elegant File Path Control

In my application i am using several Write Characters to File, and Read Characters to file. The app is a GUI that allows a user to create simple "configuration files". I want the user to be able to open/close/create new files, as the application is running, similar to what you would find in any Windows based program, under the "File" menu, but maybe with just some simple Boolean buttons for "Open" "Save" and "New".

At the moment i have a Open/Create/Replace File.vi outside the While loop, which links the path into all the Write/Read characters to file. With this configuration, the user gets a file dialog everytime the app starts.

I have tried several different methods (open/close/create new file inside case structure etc), but all culminating in the fact that Write Characters to File produces a dialog if no path is present.

The ideal solution for me, would be to have a simple FILE PATH CONTROL on the front panel, that allows the user to switch file/create new, anytime while the application is running.

Is there an elegant and simple way to do this?

Cheers

0 Kudos
Message 1 of 2
(2,600 Views)

I would suggest looking at a state machine architecture to do this.

http://zone.ni.com/devzone/conceptd.nsf/webmain/c74cec177a289dbd86256c4e00600196

Message 2 of 2
(2,590 Views)