11-06-2012 05:02 PM
I am using a FOR loop with random generation of numbers. The number of times the FOR loop runs is a product of user input. THE ONLY USER INPUT FOR THIS PROGRAM. I want to split the array output from the for loop into "Dimension" Number of arrays, each of the size of "Player". I do not want to create, Dimension number of arrays every time I Change the dimension. Right now I have programmed for 2 dimension, 10 players. So this means an array of 20 elements is split into two. If I change this to 4 dimension, 10 players, I will need to split the output from the FOR loop 4 times using the Split 1-d array feature of LV and create 4 array indicators to show on the front panel. Is there a way to automate this process of creating new indicators in the front panel? based on user input?
Thanks much for your time. Please see example file attached.
11-06-2012 05:26 PM
Rather than trying to split the data later, use nested for loops and directly generate a 2D array. Dimension sets the number of rows and Players set the number of columns (or the reverse, depending on which loop is the outer one).
You cannot create indicators at run time. Define a maximum number of Dimensions and create that many indicators manually. Then, at run time use property nodes to hide (make invisible) those which are not needed for that run.
Lynn