LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically update nested Arrays of Clusters? (Is this the Best Way?)

Solved!
Go to solution

I have a array of configuration files that gets loaded at startup. Then I need to update values within this array of configuration values. The attached VI works but I was wondering if this is the best way. It doesn't seem scaleable as I added Items I need to update (Especially because the true configuration file has a lot more items).

 

Is this the best way to update an item in nested arrays of clusters?

 

In this shortened version:

 

When I click "Set New Value" it should set the updated values for the selected Config #, Test #, SubTest #.

FrontPanel.PNG

 

Backpanel:

Backpanel.PNG

Thanks!

 

 

0 Kudos
Message 1 of 4
(2,684 Views)
Solution
Accepted by topic author kjschill

A much better approach is to use the standard bundle/unbundle and index array/replace array subset pattern. Using an Inplace Element Structure simplifies this, as shown:

NestedArrayCluster.png

Message 2 of 4
(2,671 Views)

nathand,

 

I had never heard of/used In Place Element Structure Before. Definetely easier than the method I was using. 

 

If you saved the vi could you post it back up so everyone has a good reference to your solution? 

 

Thanks a Ton!

0 Kudos
Message 3 of 4
(2,663 Views)

The image I posted is a "snippet" - it's actual LabVIEW code. You can drag it into a block diagram (or, in some web browsers, drag it to your desktop, then from there into a block diagram). That said, you should not use the code I posted directly, because it does not link to all your type definitions (some of which were missing from your ZIP archive).

 

You don't have to use an In Place Element - it works just as well to use unbundle/bundle and index array/replace array subset. In Place Element just makes that simpler

0 Kudos
Message 4 of 4
(2,661 Views)