diff --git a/SimulationDAL/Actions.cs b/SimulationDAL/Actions.cs index da130ea8..c928639f 100644 --- a/SimulationDAL/Actions.cs +++ b/SimulationDAL/Actions.cs @@ -1259,6 +1259,7 @@ public bool CompileProcessOutputFileCode(EmraldModel lists) processOutputFileCompEval.AddVariable("CurTime", typeof(Double)); processOutputFileCompEval.AddVariable("RunIdx", typeof(int)); processOutputFileCompEval.AddVariable("ExeExitCode", typeof(int)); + processOutputFileCompEval.AddVariable("OutputFile", typeof(string)); //add all the variables needed if (codeVariables != null) diff --git a/SimulationDAL/Variables.cs b/SimulationDAL/Variables.cs index 5a81120c..95aae82d 100644 --- a/SimulationDAL/Variables.cs +++ b/SimulationDAL/Variables.cs @@ -828,13 +828,13 @@ public override object GetValue() } //if not changed return the previous value - DateTime curTimestamp = File.GetCreationTime(_docFullPath); + DateTime curTimestamp = File.GetLastWriteTime(_docFullPath); string curLinkStr = linkStr(); if ((curTimestamp == _timestamp) && (_oldLinkStr == curLinkStr) && (_value != null)) return this._value; //value new so save timestamp and lookup new value - _timestamp = File.GetCreationTime(_docFullPath); + _timestamp = File.GetLastWriteTime(_docFullPath); _oldLinkStr = curLinkStr; XmlDocument xDoc = new XmlDocument(); xDoc.Load(_docFullPath); @@ -944,14 +944,14 @@ public override object GetValue() } //if not changed return the previous value - DateTime curTimestamp = File.GetCreationTime(_docFullPath); + DateTime curTimestamp = File.GetLastWriteTime(_docFullPath); string curLinkStr = linkStr(); if ((curTimestamp == _timestamp) && (_oldLinkStr == curLinkStr) && (_value != null)) return this._value; //value new so save timestamp and lookup new value - _timestamp = File.GetCreationTime(_docFullPath); + _timestamp = File.GetLastWriteTime(_docFullPath); _oldLinkStr = curLinkStr; string fileStr = File.ReadAllText(_docFullPath); JObject fullObj = JObject.Parse(fileStr); @@ -1120,14 +1120,14 @@ public override object GetValue() } //if not changed return the previous value - DateTime curTimestamp = File.GetCreationTime(_docFullPath); + DateTime curTimestamp = File.GetLastWriteTime(_docFullPath); string curLinkStr = linkStr(); if ((curTimestamp == _timestamp) && (_oldLinkStr == curLinkStr) && (_value != null)) return this._value; //value new so save timestamp and lookup new value - _timestamp = File.GetCreationTime(_docFullPath); + _timestamp = File.GetLastWriteTime(_docFullPath); _oldLinkStr = curLinkStr; string docTxt = File.ReadAllText(_docFullPath); // Find matches.