LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mass edit Event structures

Solved!
Go to solution

I have a VI in which I am coding a drag and drop events. The front panel has over 200 indicators and Booleans in which I want to make capable of accepting a drop from a drag event. My issue is the time it takes to edit the event structure for all of the controls one by one. Does anyone know of a way to mass edit event structures quickly? Unfortunately I can not figure out a way to do a drop event with the Pane references.

0 Kudos
Message 1 of 8
(2,760 Views)

How do the drag-drop event cases differ?

 

If no difference: Simply add all elements as source to the same event

If difference (small): Make a subVI for all redundancies and use this is the simplest event. Duplicate that event case and add appropriate code.

If difference (big): There's not really much to improve except you have redundant code which should be placed in a subVI.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(2,751 Views)

The event cases do not differ at all, but my issue is that I have over 200 indicators to make capable of executing that event. The edit events menu will not allow me to select more than one control at a time.

Im a little confused by your mention of using "Source". Do you mean using the side panel source tab?

0 Kudos
Message 3 of 8
(2,747 Views)
Solution
Accepted by topic author Buckeye_Tre

There may be a way to do it using LabVIEW scripting to automate the creation of a more complicated event case.

 

But you could try doing it using User Events.  Use arrays of control references fed into a For Loop to register for value change events on each control.  Then have a user event case in the event structure that handles it.  So you will be dynamically building your event programmatically while running your VI, rather than manually doing it by manipulating the event case dialog boxes.

Message 4 of 8
(2,739 Views)

@Buckeye Tre wrote:

[...]

The edit events menu will not allow me to select more than one control at a time.

[...]


 

I'm SURE I'm misunderstanding this, but you can select more than one control at a time to respond to one particular event...

 

Edit Events.png

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 8
(2,731 Views)

Im probably confusing some of you. My problem is that I can not select multiple controls at the same time by pressing shift or ctrl. Doing it the way that you show only allows you to add one control and action at a time.

0 Kudos
Message 6 of 8
(2,725 Views)

I have over 200 indicators!

 


That gets messy! Smiley Surprised Norbert's advice is one place to start.  Another thing to consider is using the bounds property for your indicators to help with identifing which of the 200+ indicators is being dropped into.Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(2,724 Views)

Your premise was correct Ravens Fan. Creating a User event with the control references array wired to the Register for Events, and then setting that to "Drop", worked the way I was looking for. I can now drop to any control or indicator and it is capable of being scalable. 

Message 8 of 8
(2,715 Views)