I would like to get hold of the item that launched the Global_OnCommand. Was it a VI, Project, LV Class etc. I also would like to get a reference to the item in order to find its path and also application instance. I would like to add functiolity that I have in the project environment with right-click and menues etc. to the toolbar.
Is there a way to do this? The "Command" input is of course know, but whatabout the "object" U64 reference. How can this be used? I can't seem to find any API VI that works with this one. In the examples this "object" is unused.
I have used "App.MenuLaunchVI" and "App.MenuLaunchApp" to get the VI name and application of a launcher VI, but I would like a more general approach what works with projects, VIs, lvclass and lvlib and all kind of items outside the "project environment".
Sorry for the delay here, I just am getting through my backlogs of email from being out of town. I played around with this for a while this afternoon but couldn't figure anything out immediately. I'll keep investigating and check with the team here and see if anyone has other ideas and get back to you.
Sorry for the delay, but I had to do some investigation before I could find an answer. It turns out that there is not one simple property or VI that will return the reference to the item of the active window in all cases. However, using some VI Server Wizardry, I was able to come up with some logic that would determine what type of window calls it and return it's reference.
Let me know if this works for your needs.
Thanks, I will try. If it would be possible to get it in LV2009 it would be great since we are still supporting this version (for the last time hopefully)?
You got it. I didn't have 2009 to test it, but it works in 2010 (with a minor modification due to the new Getting Started Window file name) so I expect it should work in 2009 as well. Let me know if you run into problems.