Perform the following steps to access the sequence names of TestStand in C#:
1. Write the following method in C#
using System;
using System.Collections.Generic;
using System.Text;
using NationalInstruments.TestStand.Interop.API;
using System.Windows.Forms;
namespace Test
{
public class TestClass
{
public void TestMethod(SequenceContext thisContext)
{
PropertyObject pObj = thisContext.AsPropertyObject();
seqObj = pObj.Evaluate( "RunState.Caller.RunState.Caller.Sequence" );
SequenceName = seqObj.Evaluate( "Name" ).GetValString("", 0 );
SequenceReqResults = seqObj.Evaluate( "RecordResults" ).GetValBoolean( "", 0 );
}
}
}
2. In the Sequence, call the .NET module (via DLL).
3. Pass this.Context as input for the C# method.
4. Configure the necessary variables (SequenceName and SequenceReqResults) as Output, to be acquired from the C# method.
Same method can be used to access step names and results.