01-06-2017 07:45 AM
Hi all,
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
01-06-2017 12:25 PM
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.
01-06-2017 01:21 PM
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.