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
 Origin Forum
 Changing Automation example to add more colums
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

MUBJ

Denmark
Posts

Posted - 12/17/2004 :  10:45:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System:XP

Hej everyone..

I am a newbie and trying to alter the automation.c example to import my data correctly..

I am having trouble creating more colums in the active datasheet.. I need to calculate ln to X-values for each row and save it in a new column but I get stranded because it won't accept inserting a new dataset dsZ for example...

easwar

USA
1965 Posts

Posted - 12/17/2004 :  12:01:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The problem could just be that you first need to create the column before declaring a dataset, such as:

int index =wksData.AddCol("name");
Dataset dsName( wksData, index);



I also want to comment that this example, automation.c, was written back in v7.0 and it reads directly from the data file line by line etc.

Since you have version 7.5, you may want to use the Import Wizard instead. With the Import Wizard, you can easily set up a filter to import your data file, and then on the last page of the wizard, you can specify script code to be executed at the end of the import. The script code can simply be a call to an Origin C function which then starts from the point where the import ends, and creates additional columns and performs computation/graphing etc. This way the actual importing of the data is taken care of without you having to code it, and you only supply code for what needs to be done after each import.

Once a filter (that optionally calls code to perform tasks at the end of the import) has been created, the wizard can then be used to import multiple files and then the code will be called at the end of each import.

There is also a batch processing tool on our file exchange page that allows you to organize this, and it works on the idea of a filter created using the import wizard:
http://www.originlab.com/fileexchange/details.aspx?fid=86

Easwar
OriginLab




Edited by - easwar on 12/17/2004 12:06:46 PM
Go to Top of Page

MUBJ

Denmark
Posts

Posted - 12/17/2004 :  8:49:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi easwar..

Thanks for the quick reply..

The information about adding colums really helped.

I tried working with the import wizard but I couldn't get it to recognize my file.... But the automation sample works sort of....

The only thing lacking is being able to copy data from the created NLSF worksheet. I am interested in copying the dependendent variable (column named B(Y)) into the existing worksheet data1... Any ideas..

I also have alot of problems saving a template and actually performing the same operations on a exact same file.. It seems like it doesn't save my settings eventhough I have made both templates and themes...

I appreciate your help. Thanks alot.

Regards Michael
Go to Top of Page

easwar

USA
1965 Posts

Posted - 12/20/2004 :  10:31:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Michael,

quote:

I tried working with the import wizard but I couldn't get it to recognize my file....



Please send one of your files to tech@originlab.com and mention this forum post in the subject line or in the message at the top. We would like to see what sort of file you have and if we can help you with it.

quote:

The only thing lacking is being able to copy data from the created NLSF worksheet. I am interested in copying the dependendent variable (column named B(Y)) into the existing worksheet data1... Any ideas..


The NLSF object can be programmed to place the fit data directly in the data worksheet as an additional column, computed at each X value of the original data etc. Please see the documentation on the NLSF object under our LabTalk documentation.

quote:

I also have alot of problems saving a template and actually performing the same operations on a exact same file.. It seems like it doesn't save my settings eventhough I have made both templates and themes...


I suggest you get in touch with tech support so that they can help you with these problems.

Easwar
OriginLab



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