05-27-2008 04:38 AM
myEngine.PostUIMessage(mySequenceContext.Execution, mySequenceContext.Thread,
UIMessageCodes.UIMsg_OpenWindows, 0, null, mySequenceFile, true );The code is working fine and I could view the Sequence file opened in TestStand Sequence editor.
Now, I wish to select one sequence in the opened sequence file to get the details of the sequence programatically. In other words, I want to simulate a mouse click to a sequence and view the steps associated with that sequence.
Can anybody give some clues...
Thanks in advance.
05-28-2008 11:42 AM
05-29-2008 12:26 AM
Hi Nick,
My problem is not solved. I am using UIMessageCodes.UIMsg_RefreshWindows to refresh the loaded sequence file. I have passed the sequence name as you suggested. The code is as shown below.
myEngine.PostUIMessage(mySequenceContext.Execution, mySequenceContext.Thread,
UIMessageCodes.UIMsg_RefreshWindows,0,mySequence.Name, mySequenceFile, true);The sequence name I passed is not getting selected.
Also I would like to know whether there is any method to select a particular step in a particular sequence.
Thanks,
Biju kuttan
05-29-2008 09:39 AM
06-02-2008 02:29 AM
06-02-2008 05:12 AM
mySequenceFile = myEngine.GetSequenceFileEx(
@"D:\dynamic loaded sequence.seq", 0, TypeConflictHandlerTypes.ConflictHandler_UseGlobalType);mySequence = mySequenceFile.GetSequenceByName(
"First"); Step myStep = mySequence.GetStep(2, StepGroups.StepGroup_Main); SequenceContext mySequenceContext = mySequenceFile.NewEditContext();mySequenceContext .AsPropertyObject();
myEngine.PostUIMessage(mySequenceContext .Execution, mySequenceContext .Thread,
UIMessageCodes.UIMsg_OpenWindows, 0, null, mySequenceFile, true); ApplicationMgr applicationMgr = (ApplicationMgr)myEngine.GetInternalOption(InternalOptions.InternalOption_ApplicationManager);SequenceFileViewMgr sequenceFileViewMgr = (SequenceFileViewMgr)applicationMgr.GetSequenceFileViewMgr(mySequenceFile);
sequenceFileViewMgr.SelectedSequences.Clear();
sequenceFileViewMgr.SelectedSequences.AddSequence(mySequence);
sequenceFileViewMgr.SelectedSteps.AddStep(myStep);
I am sure that my Sequence selected in the Sequence file loaded has more than 2 steps. Please help me in solving this problem and that in the previous post.
Thanks,
Biju kuttan
06-02-2008 02:09 PM - edited 06-02-2008 02:17 PM
06-02-2008 02:23 PM
Sorry, I forgot to mention that you also need to set the SequenceFileViewMgr.Sequence property to the sequence you are selecting. This property sets the 'focused item' in the sequences list while the SelectedSequences collection sets the 'selected list items'.
The step list displays the steps in the 'focused' sequence.
06-03-2008 06:20 AM
Hi James,
It worked. Now the sequences are getting selected and the corresponding steps are visible. Thanks... ![]()
Biju kuttan