11-05-2012 03:28 AM - edited 11-05-2012 03:44 AM
Hi,
in one of my VIs, I have to implement a runtime shortcut menu on a wavwform graph with two Application Items (Autoscale Y , Export Simplified Image) and a User Item. In the block diagram, I have an event structure in which I am setting an event for 'Shortcut Menu Activation' for Enabling/Disabling the user item(I am using 'Set Menu Item Info' function to do that). I am not modifying any properties of 'Application Items'.
When Running, all three items are appearing in the menu, but the Application Item 'Autoscale Y' is not working. It appears in the menu items, I am able to access it , but when I select that item, nothing happens i.e., autoscaling/ de-autoscaling is not happening. But the other two menu items ('Export Simplified Image' and the one User item I created) seem to work properly.
In the event structure, if I remove the event case 'Shortcut Menu Activation' (in which I am setting enable/disable property of User Item alone) all the menu functions (Autoscale Y also) are working properly.
Is there anything like if we have an Application Item (Autoscale Y) setting a 'Shortcut Menu Activation' event will prevent functioning of that?
The waveform graph I am using has more than one Y-Scale. Could that be the reason?
11-05-2012 08:38 AM - edited 11-05-2012 08:57 AM
I cannot reproduce this with LV 2012.
Overall, i am wondering why you are using "Activation" instead of "Selection"....
Another thing i could think of as reason is: Activation is a "filter event" which can discard the event. If you set this to true in your event execution, the auto scaling should not take place....
hope this helps,
Norbert
Edit: I have seen that "Selection" splits up into "(App)" and "(User)". If you require the same code to execute in both cases, i suggest you to define both event sources for a single event case. Please keep in mind that you can only "stack" events of the same "type". Because "Selection" is only available as Notify Event, you must not use the (App) Filter event type.....
11-06-2012 01:45 AM
Here I am adding a vi (LV 2012) which explains the problem.
the reason for why I am using 'Shortcut menu activation' is, based on some other applicaton parameters, the user item has to get enabled.