How do I read (and write) file globals and locals from C#? Code snippet below desn't work.
//Get process model file globals
SequenceFile
aSequence = axExecutionViewMgr1.Execution.GetModelSequenceFile();
//aSequence = axSequenceFileViewMgr.SequenceFile.GetModelSequenceFile(out modelDescription);
//Get fileglobals for sequence file
PropertyObject
aProperty = axExecutionViewMgr1.Execution.GetFileGlobals(aSequence);
//Get Order Id (in file globals)
string
anOrderId = aProperty.GetValString("CurrentOrderId", 0);
I've done it before in VB6 (and TS 2.0) and there it works fine, se below snippet.
Set myExec = myEngine.NewExecution(Nothing, aSequenceName, aModelFile, False, ExecTypeMask_Normal)
'Get process model file globals and the order report object
Set aSequence = myHelper.myExec.GetModelSequenceFile
If Not (aSequence Is Nothing) Then
'Get fileglobals for sequence file
Set aProperty = myHelper.myExec.GetFileGlobals(aSequence)
If Not (aProperty Is Nothing) Then
'Get Order Id
anOrderId = aProperty.GetValString("CurrentOrderId", 0)