NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a TS UI control in a custom LV dialog?

Hello All -
 
 
Has anyone ever tried to use the TS UI controls (such as the Sequence View control) in a non-OI situation?  
 
I was recently exploring the possibility of using the sequence View control in a custom LV dialog so that I could create a little tool similar to the existing example "Sequence Builder Tool", and was somewhat thwarted by the fact that to get the SequenceView Manager to cooperate I had to invoke AppMgr.Start() (and so eventually a Shutdown etc.).
 
What I was hoping for was a nice elegant way to present a sequence to the user so that they could highlight the steps they wanted and then do some automated sequence building with them. After trying a few approaches however, it seems to be more trouble than it's worth.  I would prefer to avoid having to start another process or build a full fledged user interface just for this tool... So I am curious to know if (and how far) the UI controls can be 'taken out of context'?
 
I have a hunch that I'll I just go back to displaying the step names as an array of strings in a listbox, but I wonder if there is a trick I've overlooked.
 
 
--Cheers
 
Elaine R.
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 1 of 3
(3,129 Views)

Elaine,

Where would your tool be called from?  In most cases where I would consider using such a tool, I would either expect to have an Operator Interface-type application, or a tool that would be called by an interface that is already displaying the sequence.

In the case of a Tools Menu Item, you can always examine the contents of RunState.InitialSelection.SelectedSteps to see what steps the user had selected prior to calling your Tool.  This assumes you are calling the tool from an envrionment that is displaying the sequence already.

If the sequence is called from an environment that doesn't display a sequence, it seems to make sense to start with an OI-type design that has editing capabilities.  In that case, you would need a minimal amount of code normally found in an OI (such as AppMgr Start and Shutdown) in order to connect the SequenceView Control to the Manager Controls.

As for other TS UI Controls, the Expression Edit Controls is fairly widely used outside of OI situations, but I don't think it applies in your case.

If I am misunderstanding how your tool would be used, let me know how you plan on using it and I can see if I can think of any other ideas for you.

Allen P.

NI

0 Kudos
Message 2 of 3
(3,109 Views)
 
Hi Allan - 
 
You're perfectly correct that in the end my application use-cases are somewhat limited! 
 
My initial instinct was that I wanted a 'tool' type approach where I'd have a nice elegant menu entry in my sequence editor/ OI which would run a sequence (very similar to the sequence builder tool that already exists) but what frustrated me was that I couldn't create an elegant popup dialog presenting the user with the template sequence of steps to choose from.
 
 I could follow the existing code and write a VI with a list box, but what I really wanted was a VI with a tiny sequence view in it!  The sequence view UI control already has so many of the features I want, the multi-select, the ability to display discription and comment... and the methods are handy for gathering the selected steps object... The crippling factor was  just to make the sequence view control work I seemed to have to have a sequence view manager, and to have the manager's methods work, I needed an application manager, and next thing I knew I had a tool that was basically a micro operator interface including full startup and shutdown behavior. This struck me as overkill for just one elegant little display method for a multi-select dialog.
 
I have since moved on to approach #2, integrating this tool into an OI, and it is working fine. It makes the whole interface a little more cluttered and naturally, rather tailored to the current task. I'd prefer to go back to approach #1 so that I could implement the builder tool as a plug-in component for any TS system.  I may end up scrapping the idea of making the sequence view control work for this (admittedly cosmetic only) dialog, but it is a pity that the object can't be used in some minimal fashion in a 'brute force' way with the engine and sequence file classes. I don't want events or callbacks on it in this situation, just the idea of a selectable listing.
 
Maybe this can count as a 'requested feature' for the future?  I can imagine situations where having a 'select sequence' or 'select sequence file' pull down/combo box, or expression editor control in a dialog might be handy too.
 
 
--Elaine R.
 
 
 
 
Cheers,
Elaine R.
www.bloomy.com
0 Kudos
Message 3 of 3
(3,104 Views)