The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Using PeakProperties with Worksheet Append

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aschmitz Posted - 01/28/2021 : 1:03:27 PM
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
2   L A T E S T    R E P L I E S    (Newest First)
aschmitz Posted - 01/29/2021 : 3:13:56 PM
Hey,
thanks for the quick reply.

I played around a little more and found that this issue only appears if the "wAppend" function is called via the OriginC XFunction interface. If I create the "appended sheet" via the OriginPro menu, the linkage stays fine and auto-update works correctly.

I attached a sample test case where I narrowed my data down as much as possible. Reproduction steps and an example of the failed source linkage are included.

https://my.originlab.com/ftp/forum_and_kbase/Images/OriginC%20wAppend%20Source%20Loss%20Demonstration.opju

Should I still submit a support request?
lkb0221 Posted - 01/29/2021 : 11:08:14 AM
Sorry, but we failed to reproduce this loss with our random made-up testing case. Would you mind sharing some more details with us so we can further investigate what is going on?
For example, a project file and letting us know what to update that would lead to this error.
You can submit through our support ticket system by the link from: https://www.originlab.com/index.aspx?go=COMPANY/ContactUS

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000