LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sort Array of References by Label-Name

Solved!
Go to solution

I am developing on an DSC application with shared variables and alarming and events with a hugh amount of variables. Each variable is displayed on the front panel within tab controls. To reduce time and effort when expanding the variables I would like to arrange my references from the front panel by the label name. I've attached a part of the intialization of the front panel. There I have to manually expand each variable in the shared variable library, where the name of the variable has to be in the same order as the definition in the cluster.

 

My approach was to build an array of references of digital type and sort the references by the label name. Because the shared variables have the same name as the controls they would be in the same order and I also could dislaim the cluster of references.

 

maybe somebody can give my an hint.

 

Kind Regards,

--

Joachim

0 Kudos
Message 1 of 3
(2,879 Views)
Solution
Accepted by topic author Joachim082

Hi Joachim,

 

use the standard "sort an array of cluster" approach!

Put the control label and the reference (in this order!) in a cluster, make an array of such clusters and sort the array. It will sort by the label and you can unbundle the reference in sorted order...

Best regards,
GerdW


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

Thanks,

after a few modifications of the sorting algorithm this works great for me.

 

Best Regards,

--

Joachim

0 Kudos
Message 3 of 3
(2,855 Views)