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" simple task
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JM67

France
2 Posts

Posted - 05/10/2012 :  09:44:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin ver. 8.51
Operating system Win 7

Hello world! :o)

I have some trouble to "automate" some analysis with Origin. I have a lot of data and always the same analysis to do and by hand, it's a bit time consumming ! I will describe my problem.
In my lab, we are using a soft called Fluorescence which is a variant of Origin, to run our fluorometer. All the data which is obtain with these machines are in Origin project (.OPJ) with several worksheet. I'am currently looking for something that can help me to redo all time the same analysis; I tried analysis template (the worksheet's one doesn't work beacause I do not the same job in each worksheet and the project's one I don't find the way to import data from an another orgin project(I achieve to connect all data manipulation I need between the different worksheet)) and I also look to write a script but I don't know enough about programming to be able to do that.
I just want to do some calculation on my dataset, an integration, a normalization and plot some of these datas.

Is here someone who could help me ?

Best regards, and please forgive me for my bad english :o)

JM

Hideo Fujii

USA
1582 Posts

Posted - 05/10/2012 :  11:33:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi JM,


I cannot think of automatization because you wrote "I do not the same job in each worksheet". Automatization means it does the same job every time. Right? Maybe you can explain a bit more what you envision?

> I don't find the way to import data from an another orgin project

Currently, you need to append other project to the current (say, master) project. To do so, you right-click on a folder in the project explorer, and choose "Append Project" flyout.

--Hideo Fujii
OriginLab
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 05/10/2012 :  11:49:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
JM67,

Automation is a powerful feature of spreadsheet programs. Unfortunately, you can't do much without using the program script language (or languages). In MS Excel, the language is Visual Basic. In Origin, there are 2 languages- LabTalk, and OriginC. I personally prefer LabTalk. OriginC programs are faster to execute, but (in my opinion) take longer to develop/de-bug than LabTalk scripts because of the added steps of compilation and linking.

I suggest you work through the Tutorials on LabTalk Programming. Make liberal use of the Help Files- concentrate on Range Notation for selecting datasets and subsets. Also, look up X-functions for integration and normalization.

Start small. Write you script to do one analysis step at a time. You might try saving your script as "custom.ogs" in the user directory, so you can execute it with the Custom Routine button. Then try creating your own toolbar with your own custom buttons.

Have fun. Good luck.

P.S. You can't open more than one Origin project at a time, so you need to open each project and save the workbooks (*.ogw files). Then, open them in your final analysis project.

DrBobShepherd

Go to Top of Page

JM67

France
2 Posts

Posted - 05/11/2012 :  04:43:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your answers !

@Hideo : I made a mistake, in fact I always do the same analysis ! In fact I have an origin project with 9 workbooks, each one with one sheet (non treated data). I do first a baseline correction, using the 9th workbooks and doing a substration of this data set with the other, then I do a integration and a normalization of all data set except the last one. Now I create a new workbook in which I put some data of interest for us do some math with and at the end I plot this data (I create 4 simple graphs, all my data in one, and 3 with the data of interest; simple curve).

@DrBobShepherd : Thanks for your advice, I will try that way ! Perhaps you know were I can found clear tutorials on LabTalk Programming and which kind of language it is ?

I have an other question; how can I call different workbook to make them active without using their complete name ? For exemple I allways named then (me or the soft) F2NCX , X being a numbre between 1 and 9 and I would for exemple do an integration is the dataset in the workbook F2NC2,F2NC3 and F2NC4 and redo the same in an other project with the workbook named FC12SM2, FC12SM3, FC12SM4 ? I mine, using a script, to do that ? (I don't know if I am clear =S)

Thanks again for your answers !

JM
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 05/11/2012 :  4:42:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi JM,

I don't know what is the best approach to answer your question... Anyway, let me take this part:

> how can I call different workbook to make them active without using their complete name ?

In LabTalk, you can make a loop to visit each workbook using "doc -e W { ... }" loop structure, e.g.:
doc -e W {
  type workbook: %H;
}
This script prints each workbook name, pointed by %H. So, you don't need to know the individual workbook names beforehand. Then, you can fill the individual process inside the loop. This is a top-down approach, but, I usually take the bottom-up approach to make individual process, then tying them into a big loop to combine.

--Hideo Fujii
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