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
 script in Origin2016 does not work in Origin8.5 no
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coll@inia.

Spain
125 Posts

Posted - 03/31/2016 :  3:19:14 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver 2016 and 8.5 or 8.6. and Service Release (Select Help-->About Origin):
Operating System:win 7

I was surprised because an script that I use normally in Origin 2016 does not work on Origin 8.5 or 8.6

Apparently is due to different reasons according to the pop ups, but I think must be something else related with some misunderstanding of particular phrases

Could anyone help me?
Thanks, julio

Upps....Here is the script:

//bb1 first column
//nn number of columns to be fitted


//get number of first column
getnumber -s FirstColNumber bb1 (number of first column);
getnumber -s NumberOfCols nn (number of columns);
ff1=bb1+nn-1;
string pageName$ = page.name$; // get the window name

//frequency counts
freqcounts -r 2 irng:=col($(bb1):$(ff1)) inc:=0.08 center:=1 end:=0 freq:=1 count:=0 cumulcount:=0 rd:=[<input>]<input>;

//1st drawings of scater without showing
bb2=bb1+nn+1;
ff2=bb2+nn-1;
plotxy iy:=(col("Bin Center"),col($(bb2):$(ff2))) plot:=201 color:=1 ogl:= [<new template:= FitGraph name:=FitGraph>];//[%(graphName$)]Layer1!; //200 line plot
string graphName$ = page.name$; //get the layer name
set %C -w 500; // 1pts line active data set
set %C -k 21; //no symbols but in the graph

//FITTING
win -a %(pageName$);
For(ii=1;ii<=nn;ii++)
{
bb3=bb1-1+nn+1+ii; //col to be fit
bb4=bb1-1+2*nn+1+2*ii;//col to be filled with bin centers
ff4=bb4+1; //col to be filled with fitted
//type -c $(bb3);
col($(ff4))[C]$=col($(bb1-1+ii))[C]$; //name fitted column comments
fitpoly iy:=(col("Bin Center"),col($(bb3))) polyorder:=9 fixint:=1 intercept:=0 oy:=($(bb4):$(ff4)) -r 2;
};


//2nd fitted drawings
For(ii=1;ii<=nn;ii++)
{
bb2=bb1+nn+1;
bb3=bb1-1+nn+1+ii; //col to be fit
bb4=bb1-1+2*nn+1+2*ii;//col to be filled with bin centers
ff4=bb4+1; //col to be filled with fitted
plotxy iy:=((col($(bb1-1+nn+1)),col($(ff4)))) plot:=200 color:=$(ii) ogl:=[%(graphName$)]Layer1!; //[FitGraph1]
set %C -w 2000; //set width 4
};

//Final format worksheet
for(kk=1;kk<=ff4;kk++)
{
wks.col$(kk).digitmode=1;
wks.col$(kk).digits=2;
wks.col$(kk).width=4;
};
for(kk=nn+1;kk<=ff2;kk++)
{
wcellcolor $(kk) C:=color(230,230,230);
};
wcellcolor $(nn+1) c:=color(255,255,200);

//formatting graph
win -a %(graphName$); //FitGraph1;
layer1.x.from=0;
layer1.y.from=0;
Layer1.x.To=1;
Layer1.y.To=0,2;
For(jj=1;jj<=nn;jj++) //change FittedLineWidth to 4pts
{
range rr=1!$(nn+jj);
set rr -w 2000;
};

legendupdate;
legend.fsize=12;

//getnumber -s FitGraphNumber FT (number of the new FitGraph);
//page.longname$=FitGraph$(FT);

string FT$;
getnumber -s (FitGraphNumber) FT$ (NUMBER+NAME OF THE NEW GRAPH);
page.longname$=FitGraph %(FT$);





























Hideo Fujii

USA
1582 Posts

Posted - 03/31/2016 :  3:50:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi julio,

Not sure that whether this is the only problem, or not; but it seems freqcounts in the old 8.x version
accepts only one dataset.
Probably in a later version it was improved to accept more than one dataset.

In a nutshell, you may encounter any sort of problems to try the downward compatibility.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 03/31/2016 3:55:41 PM
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 04/01/2016 :  03:38:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Hideo,
That was one of the things the pop up says.

I also tested manually and you are right. I was just hoping that not to be the case!!!

It seems like I will have to design some way to go around that problem making a one by one process.........too much work!

Thank you again, julio
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