03-19-2009 06:57 AM
Hi all,
As I set in the message subject, I would like to change (increment a number in fact) a fileglobal of my process model from a client sequence.
I found help in this forum to change the client globals from the process model, but what I want to do is the opposite.
Thanks in advance for your help.
Micaël.
03-19-2009 08:05 AM
Hi,
The following link may help
http://forums.ni.com/ni/board/message?board.id=330&message.id=6240&query.id=43249#M6240
Regards
Ray Farmer
03-19-2009 12:10 PM
Thanks Ray,
The last post on the link says :
"In addition, you can also check whether you are in the process model by checking the state of
RunState.InProcessModel. If this is True you are in the process model."
I got the error "Unknown variable or property name 'RunState.InProcessModel'. "
I did not find information about this property. Is it available in teststand 4.1?
Micaël.
03-20-2009 12:23 PM
You can also use RunState.Root.FileGlobals.myFileGlobal. RunState.Root. is the sequence context for the root sequence invocation. So even if you have nested execution entry points, RunState.Root always puts you at the highest level on the call stack, in the execution. This is like a short cut in the situation of a nested sub sequence, RunState.Caller.RunState.Caller.RunState.Caller.RunState.Caller.Fileglobals.x
If you initiate an execution on a sequence without using a Process Model entry point, Execute >> Run Main Sequence, the Root property object is the sequence context for the sequence you run. So you could check to see where you are in the call stack or etc. to verify there is a process model there and you aren't getting fileglobals from your client seq.
cc