NI TestStand

Showing results for 
Search instead for 
Did you mean: 

OI programmatic selection

Go to solution
I am displaying a list of sequence files in a List Bar (operator interface).  Is there a way to programmatically set the sequence file initially selected with the operator interface starts?  Perhaps use a TestStand global I would like to be able to change the initially selected sequence file when the operator interface starts.
0 Kudos
Message 1 of 8



You can use a shortcut to launch your OI and pass the list of sequences as input parameters.


i.e.; Testexec.exe "sequence 1.seq" "sequence 2.seq" "sequence 3. seq"


launch TestStand from the command line with seqedit /? to see a list of command line flags that are available to use with the TestStand engine.




0 Kudos
Message 2 of 8



Thanks for the suggestion but it doesn't work.  I'm using a frontend call back sequence to get user information.  Using that information (probably stored in a station global) I want to preselect (high light) the prefered sequence file.  However I want to preserve the option to select a different sequence file in the operator interface.


Perhaps the natural way to do this for other front panel controls is to use a control reference to get at the value property.   That doesn't seem possible with Labview/TestStand.

0 Kudos
Message 3 of 8



Since I don't know enough about your architecture, I am going to give a couple of different approaches.


First, I'd like to confirm what you're trying to do.  You'd like to load a list of sequence files, based off of who is the logged in user, and then automatically have one of them selected, also based off the current user.


There are two ways that I can think of to accomplish this.

  1. You can use the Most Recently Used file (MRU) list.  The MRU list is stored in a configuration file for the application manager, and is stored in the user's application data directory. That means that for each Windows user, there could be a different MRU list.  What you could do is in the LoginLogout sequence, when a user logs in, automatically populate the MRU list.  Then there is a property of the Application Manager in your User Interface (UI) to automatically load the files in the MRU list.  I believe that the first file in the MRU list is the one that is selected by default.

    One downside to this approach is that if a savy user does a File»Open command, and you are not populating the MRU list every time, it is possible that they could change the files that are listed, or their order.
  2. Another way you could implement this is to use globals (or UI messages) that you set from your LoginLogout sequence.  After a user logs in, you store the names (and paths) of sequence files that you want to load into a global (or post them using a UImessage).  In your UI, you can then use the Application Manager method OpenSequenceFile() to open a sequence file.  The last sequence file that you open in this way will be the one selected in your SequenceFile View Manager, and the one that any entry point buttons you have will act on.

    A downside to this method is that it breaks UI/Callback modularity tying your UI to a callback.  If you do this, you should be very careful to consider upgrade issues and code maintenance.

If you could provide a bit more information about your UI and LoginLogout architecture and the exact funtionality you are looking to implement, I can try to give you more detailed explanations and ideas.

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 4 of 8



I considered the MRU approach but rejected it for the reasons you mention.  What I am trying to do is to suggest, but not force, a sequence file selection based on input received in the front end call back.  This input is not the logged in user but other information gathered by a pop-up window called in the front end call back.  However this detail is probably not important.  I had wondered if the last opened sequence file is guarannteed to be selected and you seem to confirm this.  Programmatically opening sequence files in a different order so that the suggested file is opened last is close to what I want.  The down side is I would prefer the operator interface to always present the operator with the sequence files listed in the same order.


Thanks for the additional information.

0 Kudos
Message 5 of 8



I just thought of something else that may help.  Though you don't say what programming language you are using to build your UI, I think that this should be standard regardless of which one you're using.


When the application manager opens a sequence file, one of the events that is run is the DisplaySequenceFile event.  If you look at the callback code for this event, you will see that the SequenceFile property of the SequenceFileViewManager is being set.  So the reason that the last SequenceFile is the one selected is because it is the last one to run this event and therefore set this property.


If you wanted to load your sequence files in the same order every time, then it should be possible to do that, and then set the SequenceFile property of the SequenceFileViewManager  to the sequence file that you would like to display.


EDIT: I just found something else that might do what you want.  From your callback, you could post UIMsg_OpenWindows with the sequence file you want to display as the ActiveX paramter or the string parameter.


Let me know if I've been unclear and I'll see if I can work up a simple example.

Message Edited by Josh W. on 03-16-2009 09:42 AM
Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 6 of 8
Accepted by ken@ngc

OK, I think I've got it.


Use the SequenceFiles property of the Application manager to get a collection of sequence file objects.  Use the item method of the collection to get the sequence file object of interest.  Then set the sequence file propery of the SequenceFileView manager to the chosen sequence file object.



0 Kudos
Message 7 of 8



I've got the same type of problem.  Can you share what you did in an example?



Jonathan M. Slavic
Senior Staff Engineer
Mine Safety Appliances Co. (MSA)
0 Kudos
Message 8 of 8