badwolf Posted September 27, 2005 Report Share Posted September 27, 2005 Hi All! I attached here an example of how to read Run Time Menu Selection of another running VI. I can't believe that this is so complicated. :headbang: There should be a simpler way to do it or not ? Comments would be welcome Bye Badwolf Make run Control.vi , read menu status with Read.vi , change control.rtm as needed Download File:post-1101-1127820588.zip Quote Link to comment
Jeffrey Habets Posted September 27, 2005 Report Share Posted September 27, 2005 Hmmm, nice one.. Although I haven't had the need for it yet, I'd say for sake of completeness there should be a VI property Runtime-Menu reference. Edit: I entered a product suggestion for this on NI's website. Quote Link to comment
Louis Manfredi Posted September 27, 2005 Report Share Posted September 27, 2005 Hi Badwolf: You're right, it doesn't have to be quite that complicated. One of many simpler ways to do this is shown below. In the example below, I use a global, which is considered bad form in general,:thumbdown: but works easily for the case you've shown where the two vi's are not directly linked by one being the sub-vi of another, or by being sub-vi's of a common calling vi. A somewhat better approach would be to use a "LabView 2 style global"-- see past discussion of same in other threads in this forum. (Even if you choose to use the global as shown in my example, read the LV 2 global thread to understand what the risks involved are :!: ) Even better would be to have the vi's linked by one calling the other, or by both being called by a main vi, and then simply wiring the menubar reference out from the vi with the menu and into the vi that manipulates it, :thumbup: but perhaps you can't do that because of other logical requirements of how your vi's need to operate. Hope I've been a little help, and best regards, Louis Quote Link to comment
badwolf Posted September 27, 2005 Author Report Share Posted September 27, 2005 Hmmm, nice one..Although I haven't had the need for it yet, I'd say for sake of completeness there should be a VI property Runtime-Menu reference. Edit: I entered a product suggestion for this on NI's website. Hi jeffreyhabets! I think the property you mentioned is called Run-Time Menu Path. I think it doesn't help me in this. Thank for interest. Best regards, Badwolf :beer: Quote Link to comment
Jeffrey Habets Posted September 27, 2005 Report Share Posted September 27, 2005 Hi jeffreyhabets! I think the property you mentioned is called Run-Time Menu Path. I think it doesn't help me in this. Thank for interest. Best regards, Badwolf :beer: I think you got me wrong. The 'property' I mentioned doesn't exist (yet). What I ment to say was that it should exist. Indeed the Run-Time Menu Path is not of use for what you want. Quote Link to comment
badwolf Posted September 27, 2005 Author Report Share Posted September 27, 2005 I think you got me wrong. The 'property' I mentioned doesn't exist (yet). What I ment to say was that it should exist. Indeed the Run-Time Menu Path is not of use for what you want. Ops, yes!!! You're right!. Bye, Badwolf Quote Link to comment
Mike Ashe Posted December 5, 2005 Report Share Posted December 5, 2005 I attached here an example of how to read Run Time Menu Selection of another running VI. I can't believe that this is so complicated. :headbang: There should be a simpler way to do it or not ?Comments would be welcome First: TYFPT !!! (Thank You For Posting This) Pronounced like a cartoon character sticking their tongue out, say, Opus from Bloom County... Okay, think about it, it really wasn't that bad, and if you take your Read.vi and cut out the loop, feed in the VI name, you now have a simple subVI that takes in a VI name and returns a menu ref, providing you have added in that little snippet of code to the called VI. Not perfectly elegant, but as hacks go, this is really pretty painless now. Now you have it, and so do we. :worship: It couldn't have been that painful to write. 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.