NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Simple UI modifications

Solved!
Go to solution

I am modifying the CVI Simple user interface (TestStand 4.1.1) and would like to have similar functionality using the SequenceCombo Box and SequenceView Box as the Full Featured User Interface has with the Sequence List Box and the SequenceView (STEPLISTVIEW) box.  So that when I select a Sequence in the ComboBox the steps are shown in the SequenceView Box.

 

Thanks

john

0 Kudos
Message 1 of 5
(4,549 Views)

John -

 

In the Simple UI, the SequenceView Control is connected to the ExecutionView Manager via the ExecutionViewMgr.ConnectExecutionView() method. When connected in this manner, the SequenceView displays the sequence execution specified by the ExecutionViewMgr.Execution property (when tracing is enabled).

 

What you want is to have the SequenceView Control display the sequence, and its steps, at edit time. In order for a SequenceView Control to accomplish this, it must be connected to a SequenceFileView Manager via the SequenceFileViewMgr.ConnectSequenceView() method. When connected in this manner, the SequenceView displays, at edit time, the sequence specified by the SequenceFileViewMgr.Sequence property.

 

A SequenceView Control can only be connected to one Manager control at a time and the Simple UI contains one SequenceView Control.

 

You can either change the section of the code that connects the SequenceView Control to the ExecutionViewMgr and replace it with the appropriate code to connect it to the SequenceFileViewMgr, or you can add an additional SequenceView Control (in a new tab or tiled next to the original one) and connect it to the SequenceFileViewMgr in the manner described above. The implementation is up to you.

 

Hope this helps.

Manooch H.
National Instruments
Message 2 of 5
(4,517 Views)

Manooch

 

Thanks for the reply.  I am new at using Test Stand, so you answer is a little confusing.

 

If I were to just change that section of code, what would the actual change be?  Could you attach a code snippet?

 

Regards

John

0 Kudos
Message 3 of 5
(4,512 Views)
Solution
Accepted by topic author johnswan

Hi John,

 

The implementation is actually quite simple thanks to the TestStand Manager Controls. Simply open the CVI Simple OI code and paste the following function call in SetupActiveXControls() :

 

tsErrChk( TSUI_SequenceFileViewMgrConnectSequenceView(gMainWindow.sequenceFileViewMgr, &errorInfo, gMainWindow.sequenceView2, 0) )

 

...where sequenceView2 in parameter three is a reference to a secondary SequenceView control on the main panel (as Manooch mentioned). Fortunately, the TestStand SequenceFileView manager will handle all the necessary calls to update the SequenceView control based on the SequenceCombo box selection.

 

Attached is the source code.

Nestor
Message 4 of 5
(4,500 Views)

Thank you Nestor.

 

This works and is so simple.  Now all I have to do is switch the SequenceViews depending on if the test is executing or not.

0 Kudos
Message 5 of 5
(4,493 Views)