NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set "Apply Changes" programmatically

Hi, I am tring to modify the adapter of a step type programmatically by LabVIEW. I can do it and it changes from "none" to "LabVIEW". I do it using the TS  API: ChangeDesignatedAdapter. The problem is that I can change the Designated Adapter in the Sequence File Types but I have no changes in the step types in the sequence file. To apply the same changes to the step type in the sequence I need to mark the flag "Apply Changes in this Dialog to All Loaded step of this type". Marking this flag the step type are updated. But I can not mark this flag programmaticallySmiley Sad.
Does somebody has an idea?
 
Thanks a lot.
 
 
0 Kudos
Message 1 of 3
(3,219 Views)

Altomare,

I am afraid there is not a way to change all loaded steps of the modified step type automatically.
What you could do is to modify all the step type instances in a particular sequence file one by one.

You would have to do the following:
1. Traverse all the sequences in the sequence file.
2. For each sequence, traverse all the steps.
3. If the type of the step is the of the type you want to change, modify the 'AdapterKeyName' property.

Could you provide more details of your use case?
Why do you want to change the designated adapter programmatically?

Hope it helps.

0 Kudos
Message 2 of 3
(3,199 Views)
Thanks Antonio, I implemented the same solution you suggested me and it works.
 
I had to do it because I have a lot of sequences with a set of step types. Time ago I removed the specify module from those step type and inserted the pre-step. Now I have the need to come back to specify module but I wanted to do it programmatically.
 
Thanks. 
0 Kudos
Message 3 of 3
(3,190 Views)