04-08-2010 04:13 PM
This is very specific. I'm opening up the database of an MSI, but can't edit the file untill labVIEW stops.
I've tried different strategies such as using an invoke node to close, or just simply the close reference, and neither works.
Is it obvious to anyone what I'm doing wrong?
Solved! Go to Solution.
04-08-2010 04:22 PM
Make sure you close reference wires in the reverse order that you opened them. Right now you have a race between when the close reference function runs and the close method ont he View oject runs. Also the reference wire from the OpenDatabase method never gets closed.
If you close wires in the wrong order, you may be leaving a reference open (do you get any error messages?) and that reference may be getting hung up until LabVIEW's garbage collection runs.
04-08-2010 05:03 PM
There's more than just the OpenDatabase reference you are not properly handling.
You need to close the references of:
As Raven's fan mentioned, you may have an issue if you do not close references in the proper order. I have never run into this personally, but you most definitely have an issue with trying to run the Close method on the view while you are trying to Close the view.
I am not familiar with the MSI methods and properties, but is there a Close method for the Database (similar to the Close method for the View)? Your code opens the database, but never closes it.
04-08-2010 05:06 PM
Thanks a bunch, it makes sense what you guys mentioned. I'll try to implement it.
Thanks!
Nyne