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
 How to automate import with calculations?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

FloTor

29 Posts

Posted - 09/02/2011 :  09:37:46 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 8.1 SR1
Operating System: WinXP

I have lots of data files I want to import into my Origin project, all imports show the same procedure: Import with certain filter (which I already created), add 4 colums to the workbook and fill those columns with data calculated from the original data.
How can this calculation be implemented into my import process?

Thank you,
Florian

easwar

USA
1964 Posts

Posted - 09/04/2011 :  10:49:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Florian,

At the end of your import wizard filter, you can add LabTalk script to perform post processing. You can watch this movie:
http://originlab.com/index.aspx?go=Products/Origin/ImportingData&pid=1163
and/or this tutorial:
http://originlab.com/www/helponline/Origin/en/mergedProjects/Tutorial/Tutorial/Post_Processing_with_Import_Filter.html

If you need further help, post again.

Easwar
OriginLab
Go to Top of Page

FloTor

29 Posts

Posted - 09/05/2011 :  12:30:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks alot!
That actually helped! Great feature.
I implemented something which works nearly perfect. But there seemed to be some small error in the labtalk code. So my question is: Where can edit this specific filter again to get rid of this error?

Edit: I edited it directly in the filter file by using Windows notebook. But the following code still doesnt work:

//creating some new colums and fill them with stuff depending on the old ones (works properly)
...

//changing the type of one of the colums to 4 (=X axis)... doesnt work for some reason:

wks.col11.type = 4;

Can anyone tell my how to do this properly?

Edited by - FloTor on 09/05/2011 12:48:54 PM
Go to Top of Page

easwar

USA
1964 Posts

Posted - 09/05/2011 :  9:30:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Florian,

The statement
wks.col11.type = 4;
should work fine provided you have a 11th column in your workbook. Perhaps something went wrong when you edited the file in notepad? Try open a file in Import Wizard and pick your filter and walk thru the pages to the last page to check if the script shows properly. Contact tech support if you still have problems.

Easwar
OriginLab

P.S. To edit the filter to quickly change the script (instead of having to walk thru the wizard again), you can use the menu item: Tools->Import Filter Manager. In that dialog, pick your filter, then click Edit button.
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