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 for Programming
 LabTalk Forum
 Set column formula with LabTalk 8.1
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

normanja

USA
11 Posts

Posted - 06/29/2010 :  6:40:25 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin: 8.1GSR2
OS: WinXP (32bit)

Hi there!

Is there any way to set a column formula with Labtalk in Origin 8.1? I can influence the autoupdate behaviour with wks.co.srvm, but how can I fill the whole volumn with a formula?

What I want to do is the following:
I am importing data and setting up al the columns. Tis is done by the script. Now I want to calculate the contents of a column like col(6)=col(4)/col(5), and autoupdate that calculation, although at that moment col(5) is still empty. And as soon as I copy any data to col(5), the calculation is carried out.

Is this possible with labtalk or do I have to use an OriginC function for that? That would be a pity, since it complicates the use of the Origin files on a different computer.

Best wishes, Norman.



greg

USA
1378 Posts

Posted - 07/01/2010 :  1:11:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Currently, you can only do this with Origin C. See the SetFormula Method of the DataObject class for an example.

For LabTalk, you can use an analysis template that has your formulas stored in the appropriate columns. As you add data to the input ranges, your formulas will execute if set to auto. If set to manual, you can force the update with
run -p au;
As you noted, the SVRM property of the wks.col# object gives you control over auto, manual or no update.
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