From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
In teststand (2016), I have 2 arrays 1 1D array : 'locals.tab1 [0..4] 1 2D array : 'locals.tab2 [0..2] [0..4]
The following operation works : Locals.tab1 = locals.tab2 [1] The values contained in tab2 in index 1 are copied into tab1. But the following operation doesn't work Locals.tab2 [1] = locals.tab1 The values of tab1 are not copied into tab1 [1]
Would anyone have a solution, knowing that I do not want to have to go through the whole array
This looks like a bug in my opinion. The expression allows it and even in the Watch View pane you can do it and appears to work. However, it is just not propogating back to the variable. Unfortunately I don't know of another way without iterating through the array.
jigg CTA, CLA testeract.com ~Will work for kudos and/or BBQ~
It is likely that "Locals.tab2 [1]" is creating a new property object and the value of "locals.tab1" are being assigned. The new property object is then released.
You can see this by looking at Locals.ObjRef after executing the following expression:
Locals.ObjRef = Locals.tab2 [1] = locals.tab1
I have created a bug report (ID 622963) to investigate this further.
I believe that you will have to operate on the arrays in a code module.