ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a file refnum?

I'm having an issue with the refnum that is created when one opens a file.  Say I have an event structure (I guess it may be applicable to a properly configured case structure as well) and the behavior I want is for when one button is pressed the VI opens a file and does something, but I don't want the file to close until the user presses another button which triggers a new event behavior to execute.  When the new button is pushed the VI should close the file previously opened in the other event handler, but I can't find any way to pass the refnum the original file open vi provided after it opened the file.  I'm not trying to pass it to another VI, so I don't think I'd do it through a ctrl refnum (and I'm unclear how that works anyway).  Is what I'm trying to do possible?  If so, does anyone have any suggestions about how to go about doing it?
0 Kudos
Message 1 of 4
(3,024 Views)
Use a shift register as in the attached example:
 
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(3,019 Views)
Seems I am a little late in posting, but since I did the VI, here it is.  LabVIEW 7.1.1

Paul
Message 3 of 4
(3,015 Views)
Wow, thanks guys!  That's exactly what I needed, seems so obvious now that it's staring me in the face.  Thanks again.
0 Kudos
Message 4 of 4
(3,010 Views)