NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Who was the caller sequence?

Hello,

in a subsequence I want to know what was the caller sequence. I want to make in an ActiveX-Step a reference to the caller step. For this I need the caller SequenceFile (I got it from RunState.Caller.RunState.SequenceFile.Path), the Sequence (missing!) and the Step(RunState.Caller.RunState.StepIndex).
Now I´m missing the proberty in which sequence my caller step is.
Is there any proberty from where I can get it?

Thanks for any answer
Matthias
0 Kudos
Message 1 of 5
(5,166 Views)
Hi Matthias,

Looks like you are on the right track. Inside of your subsequence, if you specify RunState.Caller, that is a reference to the caller's sequence context. If you want a reference to the:

1. Calling sequence - Use RunState.Caller.RunState.Sequence
2. Calling Step - Use RunState.Caller.Step

So therefore, RunState.Caller.Step will reside in RunState.Caller.RunState.Sequence. There should be no need to obtain a reference to the sequence file.

Note, that you can use the NameOf function in TestStand to get the name of a property object. For example, NameOf("RunState.Caller.Step") would return to me the name of the calling step, i.e. the name of the sequence call step that launched the subsequence.

Let me know if this helps or if you n
eed an example. If you need an example please let me know what it is you want and the version of TestStand you are using. Thanks!

Ryan
Message 2 of 5
(5,166 Views)
Hi Ryan,

thanks for your answer.
My problem is that RunState.Caller.RunsState.Sequence is not a valid proberty, it's a container and there was no information about the name of the caller sequence.

After a long search I found a proberty with the sequence name, but it's a Caller deeper:

RunState.Caller.RunState.Caller.Step.TS.SData.SeqName

Why this is there I don't understand, but it's working now.

I don't need the NameOf function for the step, with Sequence.GetStep the StepIndex is enough and I only use it to clone the step and change his arguments.

Thanks,
Matthias
0 Kudos
Message 3 of 5
(5,166 Views)
See attached sequence file... I think that will answer your question.

Steve
Message 4 of 5
(5,166 Views)
Thanks a lot,

Now I had changed my ObjectReference like the example and it works.

I also rewrite some other function, your way is much easier.

Thanks for your fast help
Matthias
0 Kudos
Message 5 of 5
(5,166 Views)