NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a value of 2-dim array in NI TestStand Sequence Editor?

I want to set a hard coded value in my sequence in NI TestStand.

How will I set a value for 2-dim string array in NI TestStand Sequence Editor without creating local object?

0 Kudos
Message 1 of 4
(3,996 Views)

Hi mbda,

 

It is possible to hard code a 1 dimensional array , using thefollowing syntax:

 

myArray = {"a","bb","ccc"}

 

to do this with a 2d array,we'll need to first create a 1d array, then reshape it as a 2d:

 

myArray = {"a","bb","ccc","d","ee,"fff","g","hh","iii"},
SetArrayBounds(myArray,"[0][0]","[2][2]")

 

Let me know if you have any trouble getting this to work!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 4
(3,966 Views)

Thanks AI B.

 

I was talking about in the NI TestStand Editor itself... but somehow you gave me an idea with your answer.

Its the bracket string --> {"Sample", Str(Locals.myCollection[RunState.LoopIndex])} 

 

 

0 Kudos
Message 3 of 4
(3,944 Views)

I thought I got it right but its throwing me an error that the  "The dimensions for the array '{"['Temp', Str(Locals.twoDimCollection[RunState.LoopIndex])]"}' do not match 
the dimensions needed for the parameter 'inputParameter'."

 

My challenge is from my .net dll, I have a method that is asking for 2-dim parameter. Example: MyMethod(string[,] paramA)

From the NI TestStand editor, how can I passed a hardcoded 2-dim array? If it is 1-dim array, I dont have problem setting values because you can click plus(+) sign from the editor to add values and/or elements but when it is 2-dim there is no such icon.

 

I am pretty sure this question has been raised before it seems I cannot find solution to my problem.

Can anyone help?

 

 

Thanks! 

Message Edited by -mbda- on 02-01-2010 03:06 PM
0 Kudos
Message 4 of 4
(3,890 Views)