09-08-2009 04:56 AM
Hello,
My TestStand version is 4.0.0.
I try to remove one dimension of a multi-dimensions array during execution and i don't know how to do it ?
Thanks for your help
09-08-2009 06:49 AM
Hi,
You can do this but it would probably be quicker to pop into a code module, such as a labview VI, than to do it in TestStand.
I am assuming its an array of numbers you are obtaining.
You would need to use PropertyObject.GetNumberByOffset ( "", 0, PropertyObject.GetArrayOffst("", 0, arrayIndex))
The array index is in the form "[x][y]"
You can use PropertyObject.GetDimension to return the bounds of the array. Then create a loop to index thru the array to get the values
eg
Locals.tmpArray[Locals.index] = PropertyObject.GetNumberByOffset ( "", 0, PropertyObject.GetArrayOffset("", 0, "[0]["+Str(Locals.index) + "]"))
Hope this gets you started.
If I get the chance later I try send an example
Regards
Ray Farmer
09-09-2009 02:36 AM
Hi,
That was pretty much the solution i came up with. I thought there will be an easier way to perform the conversion.
Thanks any way