NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Set Sequence File Save Indicator in TestStand 2021

Solved!
Go to solution

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.

 

SaveIndicator_03.png

 

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:

SaveIndicator_01.png

3.When you press the OK button, the form is closed and the data is saved to a step property:

SaveIndicator_02.png

 

4. At this point, the save indicator appears because the sequence file changed (by simply adding the step to the designer):

SaveIndicator_03.png

 

5. Save the sequence file; the save indicator goes away:

SaveIndicator_04.png

6. Edit the step by pressing the Edit button in the Step Settings panel to open the form:

SaveIndicator_05.png

 

7. Change the data:

SaveIndicator_06.png

 

8. When you press the OK button, the form is closed and the new data is saved to a step property:

SaveIndicator_07.png

 

9. At this point, the save indicator is absent.  Even though the step data changed, I still want the save indicator to display:

SaveIndicator_08.png

 

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:

SaveIndicator_09.png

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

 

0 Kudos
Message 1 of 3
(859 Views)
Solution
Accepted by topic author ScottTE

Try PropertyObjectFile.IncChangeCount or SequenceFile.IncChangeCount.

Message 2 of 3
(847 Views)

That did it.  Thanks for the help!

0 Kudos
Message 3 of 3
(820 Views)