NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Attaching the sequence files to .NET object and connecting to execution button of TestStand

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??

0 Kudos
Message 1 of 6
(3,921 Views)
Hi,

You can view the source code for the C# Full-Featured TestStand OI to see how the axSequenceFileViewMgr is linking to the SequenceList.

This source code can be founf in the TestStand 4.1.1 installation directory location:

C:\Program Files\National Instruments\TestStand 4.1.1\UserInterfaces\Full-Featured\CSharp

Take a look at line 597 in MainForm.cs.

-Adri
Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 2 of 6
(3,897 Views)

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?

 

0 Kudos
Message 3 of 6
(3,883 Views)

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

Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 4 of 6
(3,861 Views)
You connect a SequenceView to a SequenceFileViewMgr. Then when you set SequenceFileViewMgr.SequenceFile to be your file, all the SequenceFileViewMgr's connected controls, including the SequenceView, will display aspects of that file.
0 Kudos
Message 5 of 6
(3,859 Views)

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

Adri Kruger
National Instruments
LabVIEW Product Marketing
0 Kudos
Message 6 of 6
(3,842 Views)