Skip to content

Commit 1990c13

Browse files
committed
ProcessCurrentExperiment: Prefer CaptureHistoryStart/CaptureHistory
This avoids having us to deal with the HistoryCarbonCopy notebook.
1 parent c17a9f9 commit 1990c13

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Packages/Conversion/MIES_MassExperimentProcessing.ipf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ End
8686

8787
static 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

Comments
 (0)