Jump to content

Project Menu Launch Info


Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment

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!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.