01-05-2010 09:08 PM
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
Solved! Go to Solution.
01-06-2010 04:26 PM
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.
01-06-2010 04:45 PM
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
01-07-2010 12:05 AM
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.
01-07-2010 06:51 AM
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.