NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the syntax for SetArrayBounds for a multi-dimensional array?

I'm trying to redimension a multi-dimensional array.  I have the Locals configured with 2 Dimentions and "Initially Empty".
 
I would like to be able to redimension it as:
 
    Locals.anValues[0 to 1] [0 to Locals.nExpectedSize]
 
The syntax in the Help shows and what I can figure out:
  SetArrayBounds(Locals.anValues,"0","10"), but that will only resize a single dimensional array.
 
The SetNumElements states that it is only usable for a single dimensional array, but I was hoping that I could redimension a multi-dimensional array with the SetArrayBounds.
 
I've searched but can't find any good examples.
 
Mike
 
0 Kudos
Message 1 of 5
(5,176 Views)

SetArrayBounds(Locals.anValues,"[0][0]","[1][" + Locals.nExpectedSize + "]") for your case.

For more general cases:

SetArrayBounds(Locals.anValues,"[0][0]","[1][10]")

 

Allen P.

NI

0 Kudos
Message 2 of 5
(5,176 Views)
I tried your code, but still do not work.
0 Kudos
Message 3 of 5
(5,114 Views)
Try:
SetArrayBounds( Locals.anArray, "[0][0]", "[1][" + Str(Locals.nExpectedSize) + "]" )

I've attached a sequence file that demonstrates this.
----
I am the founder of CnCSoftwareSolutions. When not cleaning up baby drool, I write about test data or work on Vision, a tool for understanding your test data. Visit me at www.cncsoftwaresolutions.com
0 Kudos
Message 4 of 5
(5,111 Views)
yes, it works now, thanks
 
qingmai
0 Kudos
Message 5 of 5
(5,096 Views)