NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get running process model name

Solved!
Go to solution

Hi,

 

 

I'd like to test during the execution of my sequence

1) If there is a process model which has launched the sequence

2) The name of the process model which has been launched

 

Does someone knows the sentence ??

 

Cause i've tried this in a "if" step and it doesn't seem to work properly :

 

RunState.IsProcessModel && RunState.Execution.GetModelSequenceFile().AsPropertyObject().Name == "Single Pass"

0 Kudos
Message 1 of 5
(4,172 Views)

HI Nanor,

 

you should try this:

.... && StrComp(RunState.Execution.GetModelSequenceFile().AsPropertyObject().Name, "Single Pass") == 0

 

Hope this helps

 

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 5
(4,168 Views)

Hi Nanor,

 

forget the upper stuff!!

I was wrong, because it is the same!

 

You should use this expression:

RunState.Root.Sequence.Name

 

juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 3 of 5
(4,163 Views)

Here's another version

 

PropertyExists("RunState.Root.RunState.ProcessModelClient") ? ("Process model is  " + NameOf(RunState.Root.RunState.Sequence) ) : "There is no process model"

cc

Message 4 of 5
(4,152 Views)
Solution
Accepted by topic author nanor

Thanks a lot DowNow... It's working fine !!

0 Kudos
Message 5 of 5
(4,141 Views)