LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Register for Events - Removing Elements

Hello,

 

I use "Register for Events" in my VI but I am facing a strange behavior when removing one element from the front panel. Let's imagine a quick example:

 

I have a front panel with four graphs. I want know which graph I clicked on. So, I have a string indicator that will show which graph I clicked on. However, at certain time I decide to remove one of these graphs from the front panel.

 

 

 

Then, I go to Block Diagram and Remove the case into the event structure which was handling events related to that specific graph (lets take as example graph 1 - it is the one that I want to remove).

1.jpg

 

 

 

Next, I select the Graph, its Reference and the wire (LOL) and remove them from the block diagram.

2.jpg

 

 

 

After removing Graph 1, you can see that the Event Structure still matches. I mean, the case that handles events for Graph 2 still shows String Constat "GRAPH 2"

3.jpg

 

 

 

 

Finally, I want to remove the "Mouse Down" from the "RegEvents" to have everything set.

4.jpg

 

 

 

But after that I start facing the issues. The cases into the event structure don't match to the strings anymore!

5.jpg

6.jpg

7.jpg

 

 

I've tried all possible sequences of removing these elements (wiring, unwiring Dynamic Event, etc.) but I am still getting this problem.

 

Is there a way to remove a element from front panel, remove it's event structures cases and terminals into the "RegEvents" and prevent case structure from messing up everything thing?

 

Find attached the code.

 

Thanks.

 

Dan07.

0 Kudos
Message 1 of 7
(3,398 Views)

I mistyped the last phrase. It should be:

 

Is there a way to remove an element from front panel, remove it's event structures' cases and terminals into the "RegEvents" and prevent event structure from messing up everything?

0 Kudos
Message 2 of 7
(3,392 Views)
Anyone?
0 Kudos
Message 3 of 7
(3,352 Views)

I'm not completely surprised something like this would happen.  The event structure is somewhat loosely coupled with the dynamic events and the way they are registered.  Deleting one thing could easily disrupt the order.

 

If you go into the edit events for each event case that is wrong, you can easily change it back to match up with the correct event.

0 Kudos
Message 4 of 7
(3,341 Views)
RavensFan,

I know that I can change each case into the event structure to be triggered by the right event. However, I have a large event structure with many cases and I don't want to check one by one every time I change something into the regevents. I mean, every change done to the regevents will make me aware about changes among the cases. I would like to make it safier.

Thanks.

Dan07.
0 Kudos
Message 5 of 7
(3,332 Views)

This is a bug and it's a real PITA.

 

Will NI admit it's a bug? I don't know.  You should file a bug report.

 

Shane

0 Kudos
Message 6 of 7
(3,292 Views)

Would be great to "freeze" the event structure in order to modify the "regevents" without changes into the right sequence of cases into the event structure.

 

 

0 Kudos
Message 7 of 7
(3,259 Views)