LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not to Prompt to have file replaced

I have a program where i need a file to ALWAYS be replaced and i don't want the user to make the mistake of not replacing it... therefore, how can i do it so that if the file exists it automatically replaces it without prompting the user? the file has extension txt...
0 Kudos
Message 1 of 4
(2,708 Views)
Many of the File I/O vi's have a node for Dialog which you can set to False. Make sure you do a Save As... w/ a different vi name for any modification of standard vi's.

For example, using the Write to Spreadsheet.vi, wire false to the Open/Create/Replace.vi Advisory dialog node as shown in the LV 6.1 example attached.


2006 Ultimate LabVIEW G-eek.

Message 2 of 4
(2,708 Views)
Use a sequence of "New file", "Write file" and "Close file". "New file" can overwrite the file no matter what (set overwrite=true).
Message 3 of 4
(2,708 Views)
thanx, that's exactly what i was looking for...
0 Kudos
Message 4 of 4
(2,708 Views)