NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass Array Collection to Test Stand?

Solved!
Go to solution

Hi,

I'm trying to pass collection object (ArrayList) from C# application to TS. I  have assigned output value in TS to Container, but while the sequence end executing, then occured an error: "Specified value does not have the expected type".


What should I do to get full access to my ArrayList? To what kind of variables type I should assigned ArrayList?

 

Thanks for help anyway.

piotr

0 Kudos
Message 1 of 5
(4,019 Views)

Hi,

 

If your collection is derived from System.Collections.Generic you are not able to use because generics are not supported with TS 4.2 or earlier.

You need a wrapper class.

If possible you can signup for TS 4.5beta.

 

See also this thread:

http://forums.ni.com/t5/NI-TestStand/How-to-iterate-though-a-net-dictionary/td-p/1232557

 

 

Hope this helps

juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 5
(4,014 Views)

But ArrayList is  from System.Collection Library. Is it possible to use it in TS? I also have to work with TS 4.2.

 

 

Thanks for reply

0 Kudos
Message 3 of 5
(4,010 Views)
Solution
Accepted by topic author piotrsteczkiewicz

Hi ,

 

It should work if you use ObjectReference instead a Container

Check out this simple example

 

Regards

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 5
(3,990 Views)

Thanks very much. This is the exactly answer what I was looking for.

Your example helps me a lot.

Thanks very much again!!

piotr

0 Kudos
Message 5 of 5
(3,970 Views)