In GiD 12 and 13, is it possible to ‘automate’ the following process:
- creating geometries,
- assigning conditions,
- generating mesh
- generating calculation file
For example, I have one problem where I would like to generate 10 prisms with varying thickness and mesh size, and generate the .dat files for them automatically then batch calculate. I am only talking about pre-processing. How can I do this in GiD?
You can create a ‘batch’ file with the keywords of GiD to do what you want, and run GiD following the commands of this file
e.g.
gid.exe -b
(there are more flags to run without any window, etc.)
or from the GUI could run the batch from the menu Files->Import->Batch file…
(and also a little more interactive, allowingn set stops, etc. with Utilities->Tools->Read batch window…)
About the ‘keywords’ of the batch file, to know them do you have several approaches,
for example,
- you can do an action as user and then open the ‘Undo window’ (Utilities->Undo) . Unfortunatelly this window don’t allow to copy its text.
- all actions are automatically recorded (for the Undo) in a temporary .batch file, you can open this file with an editor and copy text.
Note: you can know what is this temporary folder with the Tcl command “GiD_Info project TmpDirectory”
e.g. writting this in the lower entry:
-np- W [GiD_Info project TmpDirectory]
- you can use the tool that record a macro (top icon of the macros toolbar), and see its code after be recorded.
- you can show the ‘right buttons’ (Utilities->Tools->Toolbars… set ‘Right buttons’ inside). These buttons show the keywords available on each state.
The bath file is only a flat collection of keywords, it not a programming language.
For more complicated cases is is possible to do is with Tcl scripting language, that send keywords to be processed by GiD with ‘GiD_Process’ and ask data with GiD_Info and other GiD special Tcl commands.