Author: Darren (NI)
Note: This plugin is included in LabVIEW 2018 and later. You only need to download and install it from here if you are using LabVIEW 2017 or previous.
Adds a new Create > Event Case pull-right on controls and control terminals:
Selecting this option creates a new Event Case configured for the specified event on the control:
Some additional notes:
Attachement is saved in LabVIEW 2015. For install instructions, go here.
Works exactly as expected.
It automatically moved the control inside the event case, which I was not expecting (but pleasantly surprised).
My only two suggestions for increased UX would be that the event data unbundler could be in the middle of the left-hand side of the event structure, and the control itself could be better placed. These only take a few seconds to fix though, so all-in-all I am very happy with this plugin.
I have used this shortcut quite a while now, and I must say that contrary to Neil.Pate, I am not pleased with the "bonus" action of dropping the terminal in the event case.
The reason is that I am grouping my terminals in an unused case structure where they are organized in logical groups (e.g. tabs they are located in or function), and the last thing I want to have to do is to bring them back there from the Event case where they were just moved.
Moreover, while I could see the logic of dropping the terminal in the event case for a "Value Change" event (and only for a latchable Boolean really), I can't fathom the need to get the terminal in the case when selecting, say, the shortcut menu activation event.
The workaround I have found is to connect those unused terminals to a sequence structure (again, this is never executed), which prevents the shortcut to move those terminals.
But fundamentally, I question the need of this supernumerary action. The shortcut is about "Create Event", not "Create Event & Drop Terminal if it is unused" after all...
My 2 cts.
I understand that opinion, and see it as a valid case. I'd recommend using the shift modifier, and choose to not move the control, if shift was held when the quick drop command was called. Personally I'd say the majority of the time that an event structure case is called, the control for it is in that case, but like you said maybe that is because button value changes are the most common event type.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Great plugin!
I'd agree with the first suggestion - to move controls a bit more out from corner, because of Event structure grows when label is positioned left-sided.
Also, maybe it would be nice to extend it to have option to create duplicated event case for the selected control. It would give list of events to duplicate, and move control to that event case structure.
Would it be possible to update plugin in a way, that it'll generate single event for multiple selected controls of the same type? I mean, when someone needs to have one event page for several controls?
That should be possible. If you want to take a stab at updating the plugin with this functionality and posting back here, we can look at adding that functionality to the shipping plugin in a future LabVIEW release.
Ok, thank you - I'll give it a try then ))
It doesn't work as expected.
I created a boolean control and an event structure. When I use shortcut to create Boolean button value to change the event structure, it created a value changed event structure and move the boolean button to the event structure . Then, the value changed event structure will disappear automatically, and the boolean button will return to the previous position. For me, it's an invalid operation.
I try to resole the problem but I could not do ti . Please help me .
Thank you.
When that happens it's because an error occurred in the scripting. When an error occurs, we rollback the operation, which is why you see the code get scripted, but then go back to the previous state. Is there a chance you could post a VI that demonstrates the issue to this thread?
If you have a VI where you right-click on a control to create an event, and the creation fails in the way you describe, please post that VI so we can see why the scripting doesn't work on your VI, but it works on our VIs.
OK, I got it .
I have tried to give the VI to my colleagues, which is so easy just a bool and an event structure ,like the picture. And this function can be normally implemented on their computer.
So it sounds like something particular to your LabVIEW installation is causing problems. Here are a few things you can try to isolate what is different about your LabVIEW:
1. Close LabVIEW, rename your LabVIEW.ini file to LabVIEW.bak, and restart LabVIEW.
2. Close LabVIEW, rename [Users]\Documents\LabVIEW Data to LabVIEW Data_bak and restart LabVIEW.
See if either of those causes the issue to go away. Then you can further troubleshoot from there to try to identify the offending INI token or LabVIEW Data file.
I tried to two methods,but it still failed.😓
I experienced the same problem, where the event case gets created but immediately disappears again.
In my case the issue seemes to be related to the 'JKI Flat UI Controls 2' package. Uninstalling the package fixes the issue.
As I'd like to use the shortcut as well as the Flat Controls, any ideas how to make both work together would be greatly appreciated.
Thanks!
Thanks for the additional info. I was able to reproduce the problem when the JKI Flat UI Controls package is installed. Unfortunately, I think this problem is happening because of a bug in the right-click framework itself. The bug I'm referring to is fixed in LabVIEW 2020, and it looks like this right-click plugin (which is already included in 2020) works properly, even with the JKI Flat UI Controls package installed.
So the only workarounds I know of are to either upgrade to LabVIEW 2020, or uninstall the JKI Flat UI Controls package in LabVIEW 2015 through 2019. Let me know if you are able to find another workaround.
You're right! The bug you mentioned really turns out to be the cause of the problem.
Luckily a patch was posted earlier this year which fixes this issue in LV2015 - LV2019 by replacing a single VI in the resource folder:
I've applied the patch today (running LV2018), reinstalled the JKI package and so far everything works like a charm.
Thank you for your help!
OK, I get it .And it works well.
Thanks!
发现Bug,labview17sp1 、visa control 、Create > Event Case、Enter after deleting content 、labview Auto Close 🙄