NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with programmatically define array length

Hello

I am trying to programmatically define array length but I encounter some problems:

What I do is

1. Define empty string array "resArray"

2. get define variable INT BB as the array length

3. run the command in a statement: 

SetArrayBounds(Locals.resArray ,"[0]",[ Str (Locals.BB-1 ) ] ) 

 

When I check the syntax I get an error:

gilmaor1_0-1659521829951.png

 

How can I dynamically define the array length?

 

Thanks!

Gil,

0 Kudos
Message 1 of 2
(1,132 Views)

Hello Gil

 

You can run the command SetNumElements(Locals.resArray, Locals.BB) in your statement step.

I hope this solves your problem.

 

Chris

0 Kudos
Message 2 of 2
(1,078 Views)