Page 1 of 1

Question about batch meshing

Posted: Tue May 13, 2025 9:55 am
by marjoriejohn
Hello,
I'm working on a project to mesh a directory of IGES files using GiD. While I can utilize the macro recorder, I find that dialogue boxes remain on the screen.
Can I invoke GiD functions from a standalone Tcl/Tk script or using C/C++/Java code?

Re: Question about batch meshing

Posted: Fri May 16, 2025 11:01 am
by escolano
you can run gid in batch mode
gid.exe -b <batchfile.bch> -n
the batchfile.bch y is GiD batch file with the GiD commands to be done.
e.g. mode1.bch

Code: Select all

MEscape Files IgesRead "C:/temp/model1.igs" escape
MEscape Meshing Generate DefaultSize escape
MEscape Files WriteMesh "C/temp/model1.msh" escape
MEscape Quit No
gid.exe -b C:/temp/mode1.bch -n

You can automatize it with some external script (the language you prefer: Tcl, Java, Python,...) simply creating the batchs for the collection of files and starting gid.exe process that do each task.