Showing results for 
Search instead for 
Did you mean: 

When to Close Refnums Used in Input to 'Register Events'



Can I close a refnum to a control right after registering the event for it or do I need to close it later when I close the 'Event Registration Refnum'?


I've attached an example VI (and a picture of it) where it is closed before and after.  I get no run-time errors.





LV 2011



Download All
0 Kudos
Message 1 of 2

Hi Albert,


If you read the help file for the Register Events function you will see that when you register a particular event it will stay registered until you unregistered it or your VI stops running.


This is why the Close Reference VI after you register the event does not cause any issues. The second Close Reference VI is unnecessary since you already closed the reference with the first VI.




Josh B

Applications Engineer
National Instruments
Message 2 of 2