NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand change step name and save it

Solved!
Go to solution

Hi All,

 

I know how to change the name of a step during execution of a sequence dynamically. However I want this name to be saved in the sequence file and not only changed during runtime. 

 

Fyi: I have to automatically add numbers to step names for error logging purposes. 

Is it possible to save these new step names?

 

0 Kudos
Message 1 of 5
(3,047 Views)

Hi Nick,

 

you need to save it to "RunState.SequenceFile.Data.FileGlobalDefaults".

Best regards
J. Ludwig
0 Kudos
Message 2 of 5
(3,009 Views)

Hi,

 

Thanks for your help, however I don't see how I can save step names into "RunState.SequenceFile.Data.FileGlobalDefaults".

I used Fileglobaldefaults once, but it was to save variables permanently in the sequence file.

 

So please could you explain this further?

 

Thanks.

0 Kudos
Message 3 of 5
(3,007 Views)
Solution
Accepted by topic author Nick1991

Hi Nick,

 

sorry for not being specific enough. Also I took a wrong turn in writing "FileGlobalDefaults"...

 

I just created a new sequence, adding one "Action" step and navigated to it:

RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"]

Then, with the TeststandAPI shown, I can get this:

RunState.SequenceFile.Data.Seq["MainSequence"].Main["Action"].Name

 

If you save the new string here, it should be kept, even after the execution ends.

I hope now it works. 😉

 

Edit: Of course you should reference to the steps you want to change by number, not by name as obviously calling them by name wouldn't work.

Best regards
J. Ludwig
0 Kudos
Message 4 of 5
(3,003 Views)

Hi,

 

Thanks, this was where I was looking for…

0 Kudos
Message 5 of 5
(3,000 Views)