05-11-2009 12:52 PM
Hi - I am fairly new to TestStand and I was wondering if anyone know how to solve my problems.
The scenarion is we have Test that has multiple Sequence. For example, Test1 has Sequence1, Sequence2 and Sequence3.
I am displaying the Test1 and its sequences in the .NET treeview. My question is, when I selected the sequence I want the AxSequenceView to display the selected sequence and same thing when I execute it from AxButton. I wonder if there is some overload/override function so I can connect the sequence to these TestStand objects.
Any ideas??
05-12-2009 09:43 AM
05-13-2009 09:19 AM
Hi Adri K - The example is using TestStand objects. What I am trying to accomplish is, my sequence will come from the database and I can display that without any problem in .NET treeview. The thing that I am having hardtime is connecting the sequence to AxSequenceView object. From the example that comes with NI TestStand it is connecting the sequence by opening it through NIobject -which obviously is not what I am doing. Any ideas?
05-14-2009 02:41 PM
Hi,
Could you please provide the project that you are working with a description of what you currently have and what you would like to see. If you are not comfortable providing the project files please provide screenshots of the Designer and indicate in those images what you are currently experiencing and what behavior you would like to see.
-Adri K
05-14-2009 02:48 PM
05-15-2009 10:14 AM
Hi,
I have made the following assumptions:
You know the path of the sequence file
You have already loaded the tree view elements
You can configure an afterSelect callback for the treeView control to have the follwoing functionality:
//the sequence file that you are loading into the tree view
public SequenceFile file;
//this value will need to be the path of the sequence file
public string path = @"C:\path_to_sequence_file\SequenceFile.seq";
public Form1()
{
InitializeComponent();
axSequenceFileViewMgr1.ConnectSequenceView(axSequenceView1);
}
private void afterSelectCallBack(object sender, TreeViewEventArgs e)
{
if(treeView1.SelectedNode.Parent != null)
{
file = axApplicationMgr1.GetEngine().GetSequenceFileEx(path,107, NationalInstruments.TestStand.Interop.API.TypeConflictHandlerTypes.ConflictHandler_UseGlobalType);
axSequenceFileViewMgr1.SequenceFile = file;
axSequenceFileViewMgr1.Sequence = file.GetSequenceByName(treeView1.SelectedNode.Text);
}
}
private void formClose(object sender, FormClosedEventArgs e)
{
axApplicationMgr1.GetEngine().ReleaseSequenceFileEx(file, 0);
}
-Adri K