NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set array elements in teststand's variables using C#

Dear all,

 

here I have a C# array like [1,2,3,4], which I have 4 elements in a C# array, but in the teststand's Variables definition, the target array is only have 3, not 4 elements, so the count is not matched. so how to set array's elements in Variables of teststand by C#?

0 Kudos
Message 1 of 2
(920 Views)

I'm trying to create an array of containers in c# to pass back to TestStand as test results, and there doesn't appear to be an easy way to accomplish this task.

In c# I have results contained in List<Dictionary<string,object>> from my test system and I'd like to have those results show up in my test report. The Dictionary<string,object> has a variable number of elements of different types. MyWawaVisit

Where sequenceContext is NationalInstruments.TestStand.Interop.API.SequenceContext destination is where I'd like my results to be saved in my TestStand report, i.e. Step.Result.TestResultDestination I've tried a few different methods to add an array of containers to result.

Which adds the array of containers to my result, however any attempt to then insert an element into the array of containers results in an exception.

 

Thoughts?

0 Kudos
Message 2 of 2
(876 Views)