LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

'All Objects' property of cluster gets strange values

I tried to save data of a cluster to ini file with their label text and values, please ref
to the attached VI in LV 6.1. But the 'All Object' property of the cluster gives refNum of objects in strange sequence. It seems like the sequence you put the controls on FP, not in the order of the cluster. More interesting thing is, when I use their values, the values are in 'correct' order, so the values do NOT match their label.text and I can not get correct data in the ini file.

Did I miss something? What can I do?
0 Kudos
Message 1 of 3
(2,749 Views)
I tried your vi and found that while the refNums are in an odd order, the values assigned to the control label were correct. The Menu Ring control was generating an error at the Variant to Data vi. This left a blank line in the ini file. To correct this, make the target "Numeric" instead of "Digital" in the To More Specific Class conversion.

While they might not be in the optimum order, they should be assigned the correct values.

If not an outright bug, it's certainly annoying to get the refNums in some other order than you expect. At first I thought of sorting alphabetically by labels, but then you'd have to go back and figure out the new order, re-order the refNums, etc, etc. Certainly more effort than should be required.

Post back if you find a be
tter solution.

Tim
Message 2 of 3
(2,749 Views)
You are right. The values are correct.

I found a easy way out. The order of objects is reverse to the order of creating them on front panel. So, I just copied all items out of the cluster with 'Ctrl+drag', certainly in desired order. Then delete all items in the cluster and move all copied items into the cluster. I used reverse array for the list of 'all objects', so new items added in future development will be added after old ones.

To make the order consistent in all VIs, I made it a type def.

I think all objects on FP are pushed in a stack, I hope their order can be changed according to FP tab order or cluster order.

Hui
0 Kudos
Message 3 of 3
(2,749 Views)