NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i remove one dimension of an multi-dimensions array ?

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

0 Kudos
Message 1 of 3
(2,991 Views)

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

Regards
Ray Farmer
Message 2 of 3
(2,983 Views)

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 Smiley Wink

 

 

0 Kudos
Message 3 of 3
(2,962 Views)