LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to quickly set the properties of multiple controls of the same type

Solved!
Go to solution

I have 6 waveform controls. I set the relevant cursor events, but I used the slowest method. I wonder if there is a quick way to set cursor properties?

My VI is attached below. $83_M(YSZVTV`TG4OKZ3M9T.png

0 Kudos
Message 1 of 4
(826 Views)
Solution
Accepted by topic author Comp1ex

Hi Comp,

 


@Comp1ex wrote:

I have 6 waveform controls. I set the relevant cursor events, but I used the slowest method. I wonder if there is a quick way to set cursor properties?


How slow is it right now?

How fast do you need to set the cursor positions?

 

Suggestions:

  • When handling a lot of controls in the same way you could use an array of references and a loop instead of placing so many property nodes…
  • When changing a lot of UI element properties it may help to use the DeferPanelUpdate property before/after those changes…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(789 Views)

Thank you for your answer, because I am a novice in LabVIEW. I want to know how to set the attribute reference array。

0 Kudos
Message 3 of 4
(766 Views)
Solution
Accepted by topic author Comp1ex

@Comp1ex wrote:

Thank you for your answer, because I am a novice in LabVIEW. I want to know how to set the attribute reference array。


If you have an array of references, call the property node in a for loop.

 

This won't make execution faster though. It could be faster to program.

 

Same advice applies, try turning defer panel updates on before, and off after setting the properties. That does help for some, not all, properties. Some functionality simply stops working properly, esp. with graphs\charts.

0 Kudos
Message 4 of 4
(744 Views)