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
 All Forums
 Origin Forum
 Origin Forum
 Programm not executeable since update to 8.6

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
JulesOZ Posted - 03/25/2013 : 9:29:23 PM
Origin Ver. and Service Release (Select Help-->About Origin): Pro 8.6
Operating System: Win7

I just updated Origin from 8.0 to 8.6 and tried running a program through the command window, which was working fine in the 8.0 version. I used the same data file that I used under 8.0 as well.
I copy the script into the command window and hit enter and nothing happens. No output, no errors, no data generated.
Does anyone have an idea what I have missed?

Here is the code:
//This programm loops through all workbooks and worksheets of the active folder and performs a two-peak Gauss fit on the data.

doc -ef W {

int numWKB = page.nLayers;
int k=1;
int j;
string Bname$ = page.name$;

j=Bname.Find("parameter"); //check if the active workbook is one of the newly generated parameter books
if(j!=0)
{}

else
{
type %(Bname$) has $(numWKB) Worksheets;

//type "Window: %H, layer number: $(page.active)";

string colA$;
string colB$;
string colFit$;


for(k=1; k<=numWKB; k++) // loop through the worksheets of one workbook
{

work -v Fit; // check if worksheet has a column named "Fit", if not it will be created



type "count $(k)";
if(k < 2)
{
colA$ = Bname$+"_A";
colB$ = Bname$+"_B";
colFit$ = Bname$+"_Fit";

}

else
{
string sIndex$ = $(k);
colA$ = Bname$+"_A@"+sIndex$;
colB$ = Bname$+"_B@"+sIndex$;
colFit$ = Bname$+"_Fit@"+sIndex$;

}





nlsf.func$ = gauss;
nlsf.numReplica = 1;
nlsf.cleanupfitdata();

nlsf.fitdata$ = colB$; //defines column used as y values
y0=500; // The following lines define the starting values of the Gauss fits
xc1=42; // They have to be set manually before fitting
w1=0.6;
A1=3000;
xc2=49;
w2=0.5;
A2=3100;

nlsf.iterate(500); // Number of Iterations
nlsf.xmode = 2;

nlsf.funcx$ = colA$; // defines column used as x-values

nlsf.funccol$ = colFit$; //dataset to store fitted Y values
nlsf.makecurve(func); //dataset generated for the fitted curve
nlsf.pasteParams(R);

nlsf.paramWks(parameter);

}
}
}




9   L A T E S T    R E P L I E S    (Newest First)
JulesOZ Posted - 03/27/2013 : 02:36:42 AM
I updated to Origin9 and it seems to work now.
Thanks a lot for your help!

JulesOZ Posted - 03/26/2013 : 11:13:30 PM
thanks!
We are using a multi-user license, so I'll have to ask our administrator to do this.

Penn Posted - 03/26/2013 : 10:48:02 PM
Hi,

It seems a bug in Origin 8.6 SR0 (b70), please upgrade to SR3 from this page. Or you can run the script in Script Window (open by menu Window: Script Window).

Penn
JulesOZ Posted - 03/26/2013 : 9:41:49 PM
Hi Easwar,
using the script window as you suggested, works beautifully!
So it's my command window having a bug?

And: the looping though the worksheets works as well again - I just forgot to un-comment a few lines.
easwar Posted - 03/26/2013 : 9:36:40 PM
quote:
Originally posted by JulesOZ
...code is copied from the right-hand side window of the command window to the left hand side window, when I hit Enter, but nothing else is happening.



Hi,

So the history in the left panel of the command window updates, but the command does not execute as expected...

Open the classic script window (menu: Window->Script Window) and then paste the same script lines there, drag and select the lines with mouse, and then press Enter to execute. Does that work? If yes, somehow your command window is misbehaving, we need to try reproduce.

Also for long scripts such as the one you posted earlier, it is better to keep such script in a script file (OGS) and then execute from the file, see the LabTalk guide on how to create and use OGS files and sections.

Easwar
OriginLab
JulesOZ Posted - 03/26/2013 : 9:35:24 PM
I changed the variable thing, but that did not have an effect.
But I noticed one strange thing:
I have a comment header above the actual code. A few lines behind //
If I copy these lines into the Command window, the code is not executed as I described it. When I just copy the code, it is executing! (Yea!) However, it is not running a perfect as it did under 8.0, e.g it seems to have problems to loop through the various worksheets. But I come back about that, if I can't figure it out.

But: is it possible that a comment header, that should be just ignored while executing, gives such problems????
cdrozdowski111 Posted - 03/26/2013 : 9:21:39 PM
One thing I noticed (that may not be directly relevant to your issues) is that you declare an int variable j. j is a reserved variable name (see: http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:System_Variables&rdfrom=http%3A%2F%2Fwiki.originlab.com%2F%7Eoriginla%2Fwiki%2Findex.php%3Ftitle%3DLabTalk%3ASystem_Variables%26redirect%3Dno#X.2C_Y.2C_Z.2C_I.2C_J.2C_E.2C_T.2C_Count. )

Even if it doesn't fix your issue, it seems that an LT best practice is to name such ints as jj, kk, II, etc.
JulesOZ Posted - 03/26/2013 : 8:20:44 PM
Yes, I tried little snippets of code like this one:
range r1=[paraBF20BT1]Sheet1!col(value); // defines the column containing the desired value as range 1
range r2=[peakposition]Sheet1!col(pos111); // defines the column where the value should be stored as range 2
r2[1]=r1[2];

which worked in Origin8.0 but not in 8.6

I think it might be more some issues with settings or something, because the code is copied from the right-hand side window of the command window to the left hand side window, when I hit Enter, but nothing else is happening.
Just in case it matters, here is the exact name of the version I use:
Origin 8.6.0 (32bit) b70(Academic)
matthew@originlab.com Posted - 03/26/2013 : 11:29:06 AM
Hi,

It looks ok, we were able to run your script ok on 8.6. Do you have other scripts you used on 8.0, if so are you able to run them ok on 8.6? Or do they not work either?

Matthew
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000