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 for Programming
 LabTalk Forum
 save function dialog

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
MicheleFerrari Posted - 11/15/2005 : 11:33:42 AM
I perform a labtalk script for nonlinear curve fitting with a user defined function (*.fdf) using data in different worksheets. After one fitting session, when I want to start next session with a new worksheet, I am always asked to save or discard my function ("Attention: ... modified functions have not been saved...") Is there a way to skip this message or to automate the saving via script, since I want to run the script over multiple worksheets?

Thanks in Advance.

Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: Win2000
5   L A T E S T    R E P L I E S    (Newest First)
MicheleFerrari Posted - 11/16/2005 : 08:36:33 AM
Hi Peter,

now it works without dialog box :)
Thank you for your support.



peter.cook Posted - 11/16/2005 : 05:35:47 AM
quote:

Hi Michele,

Please view this

http://www.originlab.com/forum/topic.asp?TOPIC_ID=2054

You need to edit the nlsf.ini file accordingly.

We routinely use SaveOption=3 (can't edit formula, parameter names and constraints).

Hope it helps,

Cheers,

Pete





peter.cook Posted - 11/16/2005 : 05:33:31 AM
Hi Michele,

Please view this

http://www.originlab.com/forum/topic.asp?TOPIC_ID=2054

You need to edit the nlsf.ini file accordingly.

We routinely use SaveOption=3 (can't edit formula, parameter names and constraints).

Hope it helps,

Cheers,

Pete



Edited by - peter.cook on 11/16/2005 05:36:56 AM
MicheleFerrari Posted - 11/16/2005 : 04:01:36 AM
I have already used nlsf.msgPrompt=0.
So here's my script:

%L=joscrss; //worksheet
RSScount=1; //first row for the results
pinit=79.60491; //initiale Leistung
anzpts=19; //number of rows
using NLSF = LabTalk.NLSF;
nlsf.init();
nlsf.msgprompt=0;
nlsf.begin();
nlsf.func$="busso"; // select fitting function (user defined)
nlsf.cleanupfitdata();
nlsf.fitData$="%L_pemp"; //col with data to fit
nlsf.compileparainit=[0];

for (i=1;i<=90;i++) //iterate tfit
{
for (j=1;j<=90;j++) //iterate tfat
{
nlsf.x1$="%L_t$(i)";
nlsf.x2$="%L_t$(j)";
nlsf.dataBegin=1;
nlsf.dataEnd=$(anzpts);
nlsf.tolerance=0;
// Initialize parameter set
nlsf.p1=$(pinit); //p0
nlsf.v1=0; //no vary
nlsf.p2=0.001; //variable kfit
nlsf.v2=1; //vary
nlsf.p3=0.001; //variable kfat
nlsf.v3=1; //vary
nlsf.constr$="";
nlsf.constr$="0<kfit;0<kfat"; //constraints
// Perform the fit //
nlsf.iterateex(100); // iterate 100 times
nlsf.pasteParams(PLOT);
//results to worksheet//
%L_p0[$(RSScount)]=$(nlsf.p1);
%L_kfit[$(RSScount)]=$(nlsf.p2); //Erg kfit
%L_kfat[$(RSScount)]=$(nlsf.p3); //Erg kfat
%L_tfit[$(RSScount)]=$(i);
%L_tfat[$(RSScount)]=$(j);
%L_RSS[$(RSScount)]=$(nlsf.ssr);
%L_r2[$(RSScount)]=$(nlsf.cod);
RSScount++;
RSScount=;
};
save; //save project file
};
Mike Buess Posted - 11/15/2005 : 4:22:25 PM
You can try inserting nlsf.msgPrompt=0 in your script but I'm not sure where without seeing the script itself. I don't think I've ever seen that prompt in a scripted fitting session so it might help to post your script.

Mike Buess
Origin WebRing Member

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