| Author |
Topic  |
|
|
tib
Switzerland
105 Posts |
Posted - 05/25/2004 : 2:03:50 PM
|
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
|
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 |
 |
|
|
tib
Switzerland
105 Posts |
Posted - 05/25/2004 : 4:16:22 PM
|
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.
|
 |
|
|
Mike Buess
USA
3037 Posts |
Posted - 05/25/2004 : 4:44:10 PM
|
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 |
 |
|
|
tib
Switzerland
105 Posts |
Posted - 05/25/2004 : 5:34:00 PM
|
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;
|
 |
|
|
eparent
118 Posts |
Posted - 05/26/2004 : 09:51:44 AM
|
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.
|
 |
|
|
tib
Switzerland
105 Posts |
Posted - 05/26/2004 : 4:35:02 PM
|
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!
|
 |
|
| |
Topic  |
|