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
 separate fit results in 1wks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

deomlew

Posts

Posted - 11/13/2006 :  05:59:32 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): origin 7.0 sr04
Operating System: windowsxp

Hello,

I have a new question. Using the example "automation", I can now, via drag and drop, plot and fit my datafiles. It would be nice though if I could also get the fit results of all these separate files in one worksheet. Besides, it would be very convenient if all the graphs would also be shown in one plot. The problem is though that all my datafiles are processed separately. Does anyone know if there is an origin example that can give me some clues of how to implement this in my script?
Tnx!

Mike Buess

USA
3037 Posts

Posted - 11/13/2006 :  10:06:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This is an easy way to collect all parameters into one worksheet...

1. Download and install the MultiFit addon from the File Exchange.
2. Insert the line void mf2wks(string); after #include <Origin.h> in your version of Automation.c.
3. Insert the line mf2wks("Params"); before fldRootFolder.Activate();.

All parameters will be appended to a worksheet like that shown in the MultiFit description. I think we need to see your current code before suggesting changes to plot all data in one graph. Also, do you want to plot raw data, fitted curve or both?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/13/2006 10:22:04 AM
Go to Top of Page

deomlew

Posts

Posted - 11/13/2006 :  12:27:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Tanks again! I am getting my fit parameters in one wks now.
Regarding the all-in-1-plot: it is the raw data that I would like to have in one graph. I tried it in the following way, but instead of one plot, origin returns separate plots, renaming them by adding a number (allplots, allplots1, allplots2, etc.)

// Declare a curve object using x,y columns of worksheet
Curve crvData(wksData, 2, 3);

// Get name of curve
string strYDataName;
crvData.GetName(strYDataName);

// Get graph template name
string strGraphTemplateName = LabTalk.System.Path.Program$
+ "Samples\Programming\Automation\Automationb.OTP";

//create graph allplots in case that it is not already existing
GraphPage grphAllPlots;
if( !grphAllPlots )
{
bool cRetG = grphAllPlots.Create(strGraphTemplateName, nOptionG);
grphAllPlots.Rename("AllPlots"); // Rename the worksheetPage to allplots
}

// Declare active layer in current graph page
GraphLayer grphLayerAllPlots = grphAllPlots.Layers();

// Plot data curve to active layer
int mPlot = grphLayerAllPlots.AddPlot(crvData, IDM_PLOT_SCATTER);
grphLayerAllPlots.Rescale();
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/13/2006 :  12:51:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Glad the first part is working. I think you can create the graph you want by replacing
GraphPage grphAllPlots;
with
GraphPage grphAllPlots("AllPlots");

Mike Buess
Origin WebRing Member
Go to Top of Page

deomlew

Posts

Posted - 11/14/2006 :  03:36:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
great! that was it for now:)
tnx
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