8686
8787static Function ProcessCurrentExperiment ( STRUCT MultiExperimentProcessPrefs &prefs)
8888
89- variable jsonID, index
90- string outputFilePath, inputFile, outputFolder
89+ variable jsonID, index, ref
90+ string outputFilePath, inputFile, outputFolder, history
9191
9292 jsonID = GetJSON ( prefs)
9393
@@ -104,20 +104,20 @@ static Function ProcessCurrentExperiment(STRUCT MultiExperimentProcessPrefs &pre
104104 JSON_AddString ( jsonID, "/log/" + num2str ( index) + "/from" , inputFile)
105105 JSON_AddString ( jsonID, "/log/" + num2str ( index) + "/to" , outputFilePath)
106106
107- DoWindow / K HistoryCarbonCopy
108- NewNotebook / V=0/ F=0/ N= HistoryCarbonCopy
107+ ref = CaptureHistoryStart ()
109108
110109 AssertOnAndClearRTError ()
111110 try
112111 PerformMiesTasks ( outputFilePath) ; AbortOnRTE
113112 catch
114- printf "Caught an RTE or abort : V_AbortCode=%d\r " , V_AbortCode
113+ printf "Caught an RTE or Abort : V_AbortCode=%d\r " , V_AbortCode
115114 JSON_AddBoolean ( jsonID, "/log/" + num2str ( index) + "/error" , 1 )
116115 JSON_SetVariable ( jsonID, "/errors" , JSON_GetVariable ( jsonID, "/errors" ) + 1 )
117116 endtry
118117
119- Notebook HistoryCarbonCopy, getData=1
120- JSON_AddString ( jsonID, "/log/" + num2str ( index) + "/output" , trimstring ( S_Value))
118+ history = CaptureHistory ( ref, 1 )
119+
120+ JSON_AddString ( jsonID, "/log/" + num2str ( index) + "/output" , trimstring ( history))
121121
122122 JSON_SetVariable ( jsonID, "/processed" , JSON_GetVariable ( jsonID, "/processed" ) + 1 )
123123 else
0 commit comments