10-20-2021 12:43 PM
HI
I have a 3d string array 2x2x2 and I need to add another page to that array.
This new page is 2x3.
I am using "Insert into array" function and result is a 3D array 3x2x2, but it should be 3x2x3.
I mean, last inserted page was inserted but cut to 2x2
How can I do it ?
Regards
Solved! Go to Solution.
10-20-2021 01:01 PM - edited 10-20-2021 01:06 PM
Hi Edgar,
@EDGAR_PLATRONICS wrote:
I have a 3d string array 2x2x2 and I need to add another page to that array.
This new page is 2x3.
I am using "Insert into array" function and result is a 3D array 3x2x2, but it should be 3x2x3.
I mean, last inserted page was inserted but cut to 2x2
Did you read the LabVIEW help for InsertIntoArray? Especially the last paragraph on "Details"? That sentence about "changing only one dimension"?
@EDGAR_PLATRONICS wrote:
How can I do it ?
First change the size of the existing "pages" in your 3D array, then insert the new "page" array…
But: most often it is recommended to use BuildArray instead of InsertIntoArray - as is also in your case!
Replace InsertIntoArray by BuildArray to append your 3rd "page" and magically the 2D array is appended correctly to your existing 3D array…
10-20-2021 01:28 PM
Thank you very much for your help