LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nitpicky Issue with event structure

I am a frequent user of the "Duplicate this case" feature of the case structure.

I hadn't used it for anything terribly complicated until yesterday, and I only noticed this problem today.

The case I duplicated had many controls/indicators, and among other things, an event structure (yes, inside a loop!).  When I duplicated the case, LV happily created new controls/indicators as "control 2" etc..  What didn't happen though, was a reassignment of the event dependancies.

The 'new' event structure was still linked to "control", and was not automatically linked to "control 2", which replaced "control" in the new case.

I realize this is a lot to expect, but when it does so much already in terms of duplication and replacement of controls/indicators/references, etc., I just sort of assumed that the events would be updated too.
0 Kudos
Message 1 of 3
(2,436 Views)

Doesn't sound nitpicky to me. It makes some sense that when you duplicate an event structure the event would be relinked just like it happens when you duplicate an event.

However, this would not necessarily always make sense. For example, if the control is not inside the event structure a new control would not be created. Also, I guess LV R&D decided that it's better to safe and not to add code automatically.

Now you see why people say you should not use multiple event structures. Smiley Very Happy


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,423 Views)
I'm fully on board with you in saying that multiple event structures should not be used!

This is the first time I've done so, and was for a specific reason (production wanted an in-process test of a few things that a final test did), and in order to customize one of the parts of the test I had to duplicate the case and remove/add certain things, but the event structure needed to stay.  Thankfully the state machine architecture is quite accepting of these sorts of changes.

It's handy to know this kind of stuff though, should I ever run into it again in the future!
0 Kudos
Message 3 of 3
(2,408 Views)