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
 Adding columns makes scripts in-operable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Nilsdalby

Denmark
23 Posts

Posted - 01/26/2018 :  03:01:46 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:Origin 2017 SR2 on a win 10 platform

Hi

Im seeing a problem with many of my scripts after i have added some columns and renumerating all to A1, A2... etc. I click off the excel cell notation. An example is this script which put many columns (19) content in a long column:

loop(i,1,19){
int b=count(col($(i+2)));
Col(A2)[i+2]=b;
sum(col(A2));
c=sum.total;
Copydata irng:=[Book1]CollectAll!col($(i+2))[1:$(b)] orng:=[Book1]CollectAll!col(A1)[$(c-b+1):$(c)] clear:=0;
};

If i add cols or rename/renumerate to A1, A2..., this script stops working but gets functional again after turning origin off and back on. Some insight into what is happening here appreciated, Thanks

yuki_wu

896 Posts

Posted - 01/26/2018 :  04:54:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Did you see any error message if the script failed? Also, could you please check if you declared the variable b or c outside this script?

Regards,
Yuki
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