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
 Data manipulation during import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

J.Stellmacher

Germany
4 Posts

Posted - 02/22/2016 :  10:04:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I imagine that I can't be the first one who wants to do this but neither google nor the forum-search was of any help.

So, basically I want to import some data of the form intensity over time. Unfortunately my time column is saved as bin#, so I need to multiply these values with the time width of my bins to get the actual time and I want this to be done automatically during the import. Afaik Origins import wizard doesn't allow me to multiply any column with a constant value but it enables me to run a script so I guess I need to write a script for that? I have next to zero experience with writing and executing scripts in origin. I tried to run simple "hello world" script during import but failed.
Instructions for my problem would be greatly appreciated!
regards

snowli

USA
1381 Posts

Posted - 02/22/2016 :  2:36:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

As you observed, to modify imported data's values, you have to use Script after import. We also supported "Script after each file import" and all files imported in more file types in Origin 2016.


E.g. col(A)=col(A)*20; //column A will be multiplid by 20

Import wizard also allows extracting varabiels file name or header. So if such constant was stored in file name or header and changes based on data file, you can extract it and use in the Script after import as well.

We support labtalk script.
e.g.
type "hello world"; //dump hello world in Script window.

This is a good place to start learning Labtalk.
http://originlab.com/doc/labtalk

Thanks, Snow
Go to Top of Page

J.Stellmacher

Germany
4 Posts

Posted - 02/23/2016 :  05:28:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot! The "Script after each file import" was the part I was looking for. I just didn't assumed it to be in the advance option :)
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