LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Check to See if an Active Refnum Exists

Hey All,

 

Gumby question today.  I want have written code that opens a data log file when the "Log" button is clicked.  Now I want to add code that, under certain circumstances, checks to see if a data log file exists.  If it exists, I will close it before opening a new one.

 

My first thought is to check to see if an active Refnum exists.  If so, I would close the associated file before opening a new one.  Is this the right way to go?  If so, how do I set up a check to see if an active refnum exists?


Many thanks.

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 2
(2,325 Views)

Simply check if the file exist. There is a tool in the advanced file io palette.

 

(Your idea is flawed because a file can exist even without an active reference)

0 Kudos
Message 2 of 2
(2,323 Views)