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
 fdlog.saveAs()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

white.string

Germany
Posts

Posted - 07/07/2005 :  07:40:53 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR3
Operating System: WinXP

Hi,

I've got problems saving a project with fdlog.saveAs(). Using the code below I can save my project with the name stored in %P, but when I change the default name in the dialog box the name of the project remains the one given in %P. So in this way I'm unable to save the project into a different file. This is only the last part of the code, if one needs more information just let me know. Thanks! Rolf

%J="\\path\to\project\";
%P="projectfile";
fdlog.numtypes=2;
fdlog.type1$=[*.opj-Dateien]*.OPJ;
fdlog.type2$=[Alle Dateien]*.*;
fdlog.defType=1;
fdlog.ShowComment=1;
fdlog.path$="%J";
fdlog.default$="%P";
if(fdlog.SaveAs(N)==0)
{
// %J=%J%P;
save -di %P;
type -b "saved at %J .";
}
else
{
type -b ("Error while saving!");
};

Edited by - white.string on 07/07/2005 07:42:09 AM

white.string

Germany
Posts

Posted - 07/07/2005 :  07:51:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Okay, I've found the reason by myself, maybe it could be helpful for someone else...

if(fdlog.SaveAs(A)==0)
{
save %A;

works as desired. Cheers, Rolf
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/07/2005 :  10:33:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Rolf,

Thank you very much for the tip. We will reflect your tip in the next release of LabTalk document.

OriginLab
Hideo Fujii

Go to Top of Page

white.string

Germany
Posts

Posted - 07/08/2005 :  01:54:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Hideo,

I'm wondering what is the role of the letter in fdlog.saveAs(A) or fdlog.open(A). Looking into different code the letter varies. So far I didn't care about but now it seems that is more than a dummy ;-) Thanks for any comment.

Bye,
Rolf
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/08/2005 :  06:40:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In both cases the argument determines which string variable will hold the file path.

if( fdlog.save(P)==0 ) save %P;

if( fdlog.open(Z)==0 ) open -w %Z;

Mike Buess
Origin WebRing Member
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