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
 Please help me with the script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

LifeDeath

USA
7 Posts

Posted - 12/05/2020 :  07:32:46 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I open several dat files at a time each containing three columns of data.
In this picture you can see what I mean:
https://ibb.co/CBJBrRF
So I automatically open three columns (from one file) and after each one is open I can use some script as you can see in this picture:
https://ibb.co/vhvQ6s2
But on my previous picture you could see that I need absolute values of some columns, so I use the function abs(Col(Name)), and some columns should be X columns. I do it all manually, but can I script it?
I've tried to look for commands and functions that I need but found nothing useful. Now I will describe figuratively the three step process that I want to script:
After the data of three columns is added to a worksheet, I want to use this script (this is an abstract C-like script):


int N = LastColunmNumber;   //   I get the index of the last column at the current step
Make_X(Column(N - 2));   //   the first column of the current iteration is now an X column
Column(N - 1).function = "abs(Col( Column(N - 1).name ))";   //   Take absolute values of the penultimate column as its function
Column(N).function = "abs(Col( Column(N).name) )";   //   Take absolute values of the last column as its function



And then the next file opens automatically and the script repeats, but now the N will be different. Sometimes I need to open dozens and even hundreds of files, so this script could really help. Can you please help me? And as a little bonus, maybe you know what I should add to that after-cycle script to make vertical bold lines after each three separate columns of data (as in the first picture).
I will really appreciate your help.

cpyang

USA
1406 Posts

Posted - 12/05/2020 :  2:28:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I replied on the LabTalk forum.

https://my.originlab.com/forum/topic.asp?TOPIC_ID=46505

CP
Go to Top of Page

LifeDeath

USA
7 Posts

Posted - 12/06/2020 :  03:26:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

I replied on the LabTalk forum.

https://my.originlab.com/forum/topic.asp?TOPIC_ID=46505

CP



Thanks a lot! I've had some issued so I replied in that other topic.
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