jdunham Posted August 7, 2008 Report Share Posted August 7, 2008 I wrote some VIs which launch from the Tools menu (by the well-known trick of storing the VIs in the "C:\Program Files\National Instruments\LabVIEW 8.5\project\" folder. When I select the menu item, there is a property node for App.MenuLaunchVI, which gives the VI name, and there is App.MenuLaunchApp. I was hoping that gave the application instance which owns the launch VI, but it just gives the topmost lvproj which is open. Does anyone know how to get the AppInstance which owns the launch VI? Jason Quote Link to comment
Darren Posted August 7, 2008 Report Share Posted August 7, 2008 QUOTE (jdunham @ Aug 6 2008, 02:28 PM) I wrote some VIs which launch from the Tools menu (by the well-known trick of storing the VIs in the "C:\Program Files\National Instruments\LabVIEW 8.5\project\" folder. When I select the menu item, there is a property node for App.MenuLaunchVI, which gives the VI name, and there is App.MenuLaunchApp. I was hoping that gave the application instance which owns the launch VI, but it just gives the topmost lvproj which is open. Does anyone know how to get the AppInstance which owns the launch VI? MenuLaunchApp should always give the application instance that owns the VI from which you launched the Tools menu option. If you're seeing different behavior, it might be a bug. Can you give me specific steps to reproduce the problem? I'm not seeing it here... -D Quote Link to comment
jdunham Posted August 7, 2008 Author Report Share Posted August 7, 2008 QUOTE (Darren @ Aug 6 2008, 12:58 PM) MenuLaunchApp should always give the application instance that owns the VI from which you launched the Tools menu option. If you're seeing different behavior, it might be a bug. Can you give me specific steps to reproduce the problem? I'm not seeing it here...-D Thanks for the quick reply. I have two projects open, one of which contains the VI I launched from, and one which doesn't. MenuLaunchApp is returning whichever project is frontmost. (still using LV 8.5, sorry). I'll try to get a test VI together. Jason Quote Link to comment
Darren Posted August 7, 2008 Report Share Posted August 7, 2008 QUOTE (jdunham @ Aug 6 2008, 03:38 PM) I'll try to get a test VI together. Please do...I just tried the behavior you described in both 8.5 and 8.6 and I'm not seeing it. -D Quote Link to comment
jdunham Posted August 7, 2008 Author Report Share Posted August 7, 2008 Well a simple example I just made does not reproduce the problem. Basically I was passing App.MenuLaunchApp and App.MenuLaunchVI into the "Open VI Reference" function and getting error 1004, VI not in memory. However it's working fine right now. I'll be sure and post back if I can recreate the problem. OK. I figured out my problem. I tried to re-open the VI reference by name, but the second time, I did not wire the proper application reference. Thanks for listening! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.