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
 Set EPS options?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tib

Switzerland
105 Posts

Posted - 05/25/2004 :  2:03:50 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
I tried to create a button which automatically saves the current graph as EPS in the current directory.
I use the following script:
Image.showOptions=0; // do not show export options;
Image.FileName$=%X%H.eps;
Image.Export.PageDPI(EPS,300,24,0); // export EPS;

I do not want to have a preview image.
So, I tried to set the preview option to none, however I could not find any command to do that.
Does anybody know how?
Thanks, Tilman.

Mike Buess

USA
3037 Posts

Posted - 05/25/2004 :  3:05:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Tilman,

It sounds like you are trying to avoid file dialogs entirely so this may not work. But it's the only property I can find that seems remotely applicable.

image.filedlg.preview=0;


Mike Buess
Origin WebRing Member
Go to Top of Page

tib

Switzerland
105 Posts

Posted - 05/25/2004 :  4:16:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mike,
your option is for importing images.
With my script I can export EPS without any Dialog,
however, I can not switch of the TIFF preview image in the EPS file.

I was hoping for some undocumented thing like
Image.Export.EPS.Preview=0
Maybe it exists anyway? Who knows?
Again, I presumed that anything you can do with the mouse you should be able to do via LabTalk. But obviously that's not the case.
Greetings, Tilman.

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 05/25/2004 :  4:44:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Tilman,

Image import and export seem to use several INI files. You might look at oimg.ini and oeps.ini in particular. I know that the former is used for export options and the latter seems to be for eps. Both have sections or keys that are related to preview.

If you find what you need there you can change the settings with the INI object.

Mike Buess
Origin WebRing Member
Go to Top of Page

tib

Switzerland
105 Posts

Posted - 05/25/2004 :  5:34:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot, Mike,
that's it.
Tilman.

ini.file$=oeps.ini;
ini.section$=preview;
ini.key$=preview;
ini.setStr(none); // options: none, TIFF, WMF;

Image.showOptions=0; // do not show export options;
Image.FileName$=%X%H.eps;
Image.Export.PageDPI(EPS,300,24,0); // export EPS;


Go to Top of Page

eparent

118 Posts

Posted - 05/26/2004 :  09:51:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Tilman,

I just wanted to point out that while the oeps.ini file is used by the EPS export code it is also used for initializing the EPS Options dialog. When a user makes changes in the EPS Options dialog those changes are saved in the oeps.ini for the next time the user uses the options dialog. To make the script code in your button more complete I would suggest you get the Preview setting, set it to none, export, and then set the Preview setting back to what it was.

You can do this by adding 'ini.GetStr(z,"");' before your call to ini.setStr. Then do 'ini.SetStr(%z);' after your call to Image.Export.DPI.

Just a suggestion.

Thanks.


Go to Top of Page

tib

Switzerland
105 Posts

Posted - 05/26/2004 :  4:35:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks eparent,
for this good suggestion.
I was thinking about that. But it was not completely clear how this ini.GetStr() worked. But now it is. Thanks!

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