[Gmsh] Save options file upon exit automatically?
Geordie McBain
gdmcbain at freeshell.org
Wed Jul 27 03:25:43 CEST 2011
2011/7/27 Christophe Henrard <Christophe.Henrard at samtech.com>:
> Hello everybody,
> I've been using GMSH for quite a while and develop my own scripts to reload
> options at startup and save imaged upon exit.
> I always use the menu option "File" -> "Save As..." -> "xxx.opt". Does
> anybody know if it is possible to do this automatically upon exit and chose
> the file name by writing some command in the startup option file? For
> example, to automatically save the plotting area as a png figure upon exit,
> I wrote this in my startup opt file:
> >> FigName = "Figure.png";
> >> Print Sprintf(FigName);
> Can we do something similar with the options file?
I haven't tried it myself, but I think this might be what
General.SaveOptions is for.
http://geuz.org/gmsh/doc/texinfo/gmsh.html#index-General_002eSaveOptions-582
See also General.OptionsFileName and General.SessionFileName.