It is possible to open an IDLE shell, e.g. to try interactive Python commands, with the Tcl proc GiD_Python_Open_IDLE_Shell
In practice go to GiD top menu Utilities->Tools->Console Python…e.g. the next picture show this IDLE console and the use of
Example:
The next picture shows the IDLE console, in which a Python command to set sets a variable with the current number of surfaces asked to GiD:
num_surfaces=tcl.GiD_Info("geometry","numsurfaces")
and Then, it creates in GiD a new straight line in the layer Layer0 “Layer0” from the point id =1 ”1” to the point id =2 “2” and store stores the returned new line id in a variable:
id_new_line=tcl.GiD_Geometry("create","line","append","stline","Layer0","1","2")
...
Note that the new line is not immediately shown , until the model is redrawn (can invoke it . This can be done with with tcl.GiD_Redraw()
).
Note: The use of this console is recommended to interactively try several Python commands.