g_sures Posted January 19, 2011 Report Share Posted January 19, 2011 Hi All, When I edit the Limits of a numeric Limit Step Programatically, the value got Updated in Step Variables. But in Limit Tab, it is not getting Updated at that time. When I click other step and Come Back to the Same, it is getting updated. Can you suggest me a solution to Overcome this(i.e to update whenever the value is modified using Property)? Thanks in Advance, Suresh Kumar.G Quote Link to comment
g_sures Posted January 20, 2011 Author Report Share Posted January 20, 2011 Hi All, When I edit the Limits of a numeric Limit Step Programatically, the value got Updated in Step Variables. But in Limit Tab, it is not getting Updated at that time. When I click other step and Come Back to the Same, it is getting updated. Can you suggest me a solution to Overcome this(i.e to update whenever the value is modified using Property)? Thanks in Advance, Suresh Kumar.G 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.