Christophe ,
Many thanks! I suppose I should read all the FAQ :-(
Kind regards,
Randal
-----Original Message-----
From: Christophe Geuzaine
Sent: Tuesday, March 24, 2020 2:03 AM
To: Andress
Cc: Gmsh
Subject: Re: [Gmsh] How to set MSH file format to 2
On 24 Mar 2020, at 05:33, Andress <[email protected]> wrote:
Is it possible to set MSH file format to 2 as an option for the later
versions (4.5.4) of Gmsh, so that when the .msh is saved from the GUI, it
will produce MSH2 instead of MSH4 ascii files?
Sure. With the GUI, select File->Export, enter a .msh filename, then select
the format you want in the dropdown menu. Then use File->Save Options as
Default. This will save your options in ~/.gmsh-options.
See also FAQ 17 in
http://gmsh.info/doc/texinfo/gmsh.html#Mesh-module-questions:
```
How can I save a mesh file with a given (e.g. older) MSH file format
version?
• In the GUI: open ‘File->Export’, enter your filename.msh and then pick the
version in the dropdown menu.
• On the command line: use the -format option (e.g. gmsh file.geo -format
msh2 -2).
• In a .geo script: add the line Mesh.MshFileVersion = x.y; for any version
number x.y. You can also save this in your default options.
• In the API: gmsh::option::setNumber("Mesh.MshFileVersion", x.y).
As an alternative method, you can also not specify the format explicitly,
and just choose a filename with the .msh2 or .msh4 extension.
```
Christophe
Kind regards,
Randal
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh