06-14-2016 12:49 AM
Hello:
I use Teststand2013,
SetArrayBounds( FileGlobals.Drt_Step_Data_Filt, "[0][1]" , "[3][3340]") to set bounds of the 2D array "FileGlobals.Drt_Step_Data_Filt".
when I check in the "Watch View" the bounds is in what i want [0..3][1..3340],
but after check the dimension 0-->FileGlobals.Drt_Step_Data_Filt[0], the bound is [0..3339] not [1..3340]
and SetArrayBounds( FileGlobals.Drt_Step_Data_Filt[0], "[1]" , "[3340]") is not work.
what can i do to change 1 dimension size of a multi dimension array?
thanks a lot!
Solved! Go to Solution.
06-14-2016 02:58 AM
The run time data in Watch view as below:
06-15-2016 09:36 AM
Hi johnnnywang,
When you look at an array subset in TestStand, it will always be 0 indexed. If you want to be able to set the bounds on the array subset, you will need to assign it as the value of a new variable. For example:
Step 1:
SetArrayBounds( FileGlobals.Drt_Step_Data_Filt, "[0][1]" , "[3][3340]")
Step 2:
FileGlobals.Drt_Step_Data_Filt_Subset = FileGlobals.Drt_Step_Data_Filt[0], SetArrayBounds(FileGlobals.Drt_Step_Data_Filt_Subset, "[1]","[3340]")
This way the resulting FileGlobals.Drt_Step_Data_Filt_Subset
will be 1 indexed.
I hope that helps!
06-15-2016 10:01 PM
Got it, thank you very much!