How do I Force TestStand to Update the Values Displayed in the Sequence Editor for a Step?
Primary Software:
Primary Software Version: 2.0.1
Primary Software Fixed Version: N/A
Secondary Software: N/A
Problem:
I have written a custom step type for my test and can configure limits and operations using the edit dialog box. These values are also part of my step's description string. I notice that after making my changes with the dialog box, the step doesn't update its description string to reflect the new values until after I view the properties. My new values are there, but how do I make the window update to display them?
Solution:
Whenever you make editing changes to a sequence file programmatically, you need to increment the sequence file change count by calling the SequenceFile.IncChangeCount()method. This method indicates to the sequence editor or operator interface that changes have been made; thus, the Sequence File window should refresh reflecting the new values.
To increment the change count from within TestStand, you can have a step using the ActiveX Automation Adapter configured as follows:
ActiveX Reference: RunState.SequenceFile
Object Class: SequenceFile
Method: IncChangeCount
When inside LabWindows/CVI or another programming environment, first retrieve a handle to your current sequence file, and then call the same API method. For example the last three lines of code at the end of your custom Edit dialog box could be the following:
//Use the TestStand SequenceContext reference to obtain the current sequence file object
TS_SeqContextGetProperty (seqContext, NULL, TS_SeqContextSequenceFile, CAVT_OBJHANDLE, &myseqfile);
//Increment the Sequence File change count
TS_SeqFileIncChangeCount (myseqfile, NULL);
//Release the ActiveX reference to the sequence file object
CA_DiscardObjHandle (myseqfile);
Thanks,
Suresh Kumar.G