gid command line documentation

Hi, I’m using GiD v12.0.11, and I’m attempting to use it through the command prompt on Windows 10. For example, the command “D:\Program Files\GiD\GiD 12.0.11\gid.exe” -e Mescape geometry create line 0,0 0,1 does create a line from 0,0 to 0,1, but I can’t figure out how to get GiD to automatically save the project to a file and close afterwards. Is there some kind of documentation available for the command line?

Thank you!

You can see the valid command line syntax in the GiD reference manual
https://www.gidhome.com/documents/referencemanual/GENERAL%20ASPECTS/Invoking%20GiD/Command%20line%20flags

The -e flag is not common, rarely used for a very simple and short ‘command’ that could be written in the same command line.

To automatize a task you can write the ‘process’ keyword commands in a batch file (a simple text file) that could be interpreted with

gid.exe -b “your_file.bch”
(it is possible to add extra flags to be run without any window -n ,and also enable or not drawings +g to take pictures, etc.)

e.g. the content of the batch could be something like this, to create a line, save the model to disk and exit

Mescape geometry create line 0,0,0 0,1,0 escape
MEscape Files SaveAs “C:/temp/your_model.gid” escape
MEscape Quit No

Hello there, I have a similar issue. I am using one of the modules of GID called “IBER” for river simulations and I have not been able to make it run from the command prompt. I can make the software opens and load the file but I can not make it run. This is what im typing in the command line: C:\Program Files\Iber\Iber 2.5>gid “C:\file path”. This simple command make the IBER open and load the file, but not run. Does someone know how to make it run,whats the right command line sintaxis? I guess all GID interfaces use the same language. Thanks in advance.

you can write a small batch file with the GiD process commands to be done
e.g. my_file.bch

MEscape Files Read “your_path/your_model.gid”
MEscape Meshing Generate Yes DefaultSize
MEscape Utilities Calculate escape escape escape

and then invoke GiD with -b to process this file

gid.exe -b my_file.bch

if is is not necessary and GUI or creating screen images could run gid without any window with the -n flag
gid.exe -n -b my_file.bch
In this case add to the end of the batch the command to exit GiD

MEscape Files Read “your_path/your_model.gid”
MEscape Meshing Generate Yes DefaultSize
MEscape Utilities Calculate escape escape escape
MEscape Quit No escape

If the batch content is very short, maybe can done with the flag -e, without require an extra batch file:
gid.exe -e MEscape Files Read “your_path/your_model.gid” escape MEscape Utilities Calculate escape escape escape MEscape Quit No escape

Escolano,

Thank you very much for your help certainly you had the answer, the batch file works properly.

I appreciate it a lot.

All the best.