LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete elements from array during runtime with 1d array of cluster

Hi, I am running LV2018 so I think I am missing that orange .vim to the left. Does it just remove duplicates from an array? Also, what is filters? Just a 1d array of clusters containing the boolean clickers and strings?

0 Kudos
Message 11 of 18
(165 Views)

Ah, this is why it is always useful to specify your LV version in the original post.

This is the "Remove duplicates From 1D Array" vim from the Array palette, appeared in LV2020 I think.

 

Here is a legacy implementation instead:

raphschru_0-1736764672989.png

 

0 Kudos
Message 12 of 18
(159 Views)

Hi, I meant to say LV2018. Yes I have tried opening it and it doesnt work.

0 Kudos
Message 13 of 18
(153 Views)

@Asasafuchi wrote:

Thanks! This seems to populate the array correctly but turning the buttons on/off do not change Array 2. Are your buttons working? 

 

Asasafuchi_0-1736763656694.png

 


Now you reset them every time as you recreate the initial cluster array. Do the init outside the loop.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 14 of 18
(146 Views)

Thanks! That did the trick

 

I assumed you mean doing like this? 

 

Asasafuchi_1-1736769827052.png

 

0 Kudos
Message 15 of 18
(132 Views)

Hi Asa,

 


@Asasafuchi wrote:

I assumed you mean doing like this? 

Asasafuchi_1-1736769827052.png


No!

  • You still don't initialize "Array3"…
  • You don't need the Select node…
  • As it is UI-handling code you should use an event structure…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 18
(130 Views)

I need my Array 3 because that is the array containing the clusters and strings of text. Even when initiating Array 3 outside the loop I get the issue that the buttons dont remove anything but if I use the select node it works. Would using an event structure be better? Because this seems to work.

 

Asasafuchi_1-1736772195188.png

 

 

0 Kudos
Message 17 of 18
(120 Views)

Hi Asa,

 


@Asasafuchi wrote:

Even when initiating Array 3 outside the loop I get the issue that the buttons dont remove anything but if I use the select node it works.


  • Move the local of array3 before the while loop to initialize Array3. Inside the loop you don't need this Select node anymore.
  • Writing the data of Array3 into a local variable of Array3 is just pure Rube-Goldberg!

@Asasafuchi wrote:

Would using an event structure be better?


Yes, because you can react on user events instead of polling the UI elements…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 18 of 18
(114 Views)