I am doing a very similar thing as asked in the title post.
I have an array of numeric controls, whose 'number of rows' I set through a separate single numeric control. So far so good.
But the newly created numeric controls are not initialized with zeros etc, therefore, the next code in line freaks out. It doesn't have any outouts from those newly created rows.
I would like to add these number of rows AND at the same time, put zeros to them as well.
Would appreciate any help.
The number of visible rows is cosmetic, and has nothing to do with the array size. You need to make sure that the array is resized accordingly. Or you could make the size same as the max number of rows you'll ever need from the beginning.
Hi Dennis_Knutson & altenbach,
Thanks for looking at my question.
I was so close to the answer, yet so far. You have helped me go get it.
As Denis suggested, I was indeed trying to initialize, and as altenbach pointed out, I realized that the rows being added are just being made visible and not appended to the dimention of the array.
My hurdle was that after initializing the arrays, I get an output array which can only be an indiciator, but I needed an array of controls.
So, just now I used the property node 'Value' and fed it to the output terminal of 'Resize array' and it works.
Thanks & Regards
PS: The initialization if achieved using 'Initialize array' kept on forcing zeros forever, even when I modified entries in the controls later on.
I guess I was a little fast in replying.
Please find attached a vi utlilizing both the ideas respectively, i.e. Initialize array and Reshape Array functions.
While the Reshape function works, populating all cells with zeros, I would rather have it populate with anything other than zero. Because my code down the line freaks out with zeros.
The Intialize function allows me to put any number other than zero, but then it keeps on forcing that number, even if I change it manually.
Please check the vi and let me know what I am missing here.