07-13-2022 05:54 PM
I am wondering if there is a way to programmatically set the save indicator status of a sequence file that was modified via a custom step.
In TestStand, when you modify an existing sequence file, an indicator appears on the tab (after the file name) until you save the file.
I've created a custom step that works like this:
1. Drag and drop the custom step from the Insertion Palette to the sequence window
2. A custom form pops up that allows you to enter some data:
3.When you press the OK button, the form is closed and the data is saved to a step property:
4. At this point, the save indicator appears because the sequence file changed (by simply adding the step to the designer):
5. Save the sequence file; the save indicator goes away:
6. Edit the step by pressing the Edit button in the Step Settings panel to open the form:
7. Change the data:
8. When you press the OK button, the form is closed and the new data is saved to a step property:
9. At this point, the save indicator is absent. Even though the step data changed, I still want the save indicator to display:
This is the C# code that is used to save the data to the step variable:
stepAsPropObject.SetValString(lookupString, PropertyOptions.PropOption_CaseInsensitive, value);
* stepAsPropObject is an object of type NationalInstruments.TestStand.Interop.API.Step that is passed to the method as a NationalInstruments.TestStand.Interop.API.PropertyObject:
I've not found anything in the documentation that indicates this can even be done. Maybe I missed it. So can anyone please help me determine if this can be done and how?
Thanks,
Scott
Solved! Go to Solution.
07-13-2022 06:39 PM
Try PropertyObjectFile.IncChangeCount or SequenceFile.IncChangeCount.
07-14-2022 01:44 PM
That did it. Thanks for the help!