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
 Origin Forum
 Changing Automation example to add more colums

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
MUBJ Posted - 12/17/2004 : 10:45:24 AM
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...
3   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 12/20/2004 : 10:31:16 AM
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



MUBJ Posted - 12/17/2004 : 8:49:52 PM
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
easwar Posted - 12/17/2004 : 12:01:29 PM
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

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