01-18-2011 04:31 AM
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
01-20-2011 03:14 AM
Finally I explored and Got the solution for the same.
It is available @ http://digital.ni.com/public.nsf/allkb/1B73380CE815391F86256C9C00612EDD
Which explains like
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:
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