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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Using PeakProperties with Worksheet Append
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aschmitz

5 Posts

Posted - 01/28/2021 :  1:03:27 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

lkb0221

China
497 Posts

Posted - 01/29/2021 :  11:08:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

aschmitz

5 Posts

Posted - 01/29/2021 :  3:13:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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?
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000