Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2021 9.8.0.200
Operating System: Win10
Hi all,
I am running into a little problem with automated data collection from several worksheets and I hope, someone has some clever ideas.
What I want to accomplish:
I have a project with several luminescence spectra. On each of these spectra I have run the Peak Analyzer tool and send all of the result sheets into a single workbook.
Now I want to collect a certain column from all PeakProperties result sheets in an additional worksheet and have this reference auto-updated every time that I change the peak fitting parameters of one or more of the spectra.
What I tried:
So far, I tried using the Append Worksheet function, which basically does exactly what I need as it collects the data correctly from all result sheets.
The Problem:
As soon as I update one of the peak fits, the "appended" worksheet looses its input parameters and can hence not be updated anymore.
When I display the wAppend parameters, I get the following before and after adjusting the fit parameters.
Before:
Analysis(17173): wAppend
Created by Admin on 28.01.2021 18:45:03
Last Executed by Admin on 28.01.2021 18:45:03
Duration of the Last Execution is unknown
Inputs:
[OD205 - OD2.0, 5 s]PeakProperties1!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties2!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties3!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties4!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties5!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties6!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties7!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties8!G:"Center Grvty"
[OD205 - OD2.0, 5 s]PeakProperties9!G:"Center Grvty"
Outputs:
[OD205 - OD2.0, 5 s]EnergyCols!A:I
After:
Analysis(17173): wAppend
Created by Admin on 28.01.2021 18:45:03
Last Executed by Admin on 28.01.2021 18:46:18
Duration of the Last Execution is 47 ms
Inputs:
Outputs:
[OD205 - OD2.0, 5 s]EnergyCols!A:I
So what I think is happening here, is that rerunning the fitting (via Change Parameters... seems to erase the old PeakProperties result sheet and create a new one such that wAppend looses its input parameter.
Alterantives that don't work:
I tried using the Batch Peak Analyzer with Theme but this does not work out. While the summary output is basically what I want to have, the values do not get updated after I update a single fit.
I hope someone has some idea on how to fix this. I could potentionally write an OriginC script that simply trashes and recreates all of the collection sheets that are present, but that feels quite risky to me.
Thanks and greets
Alex