Page 1 of 1

exporting information from GiD via a text file

Posted: Wed Jun 23, 2021 2:34 pm
by jlyon426
Hello everyone
I am currently exporting information from GiD via a text file: geometry, grid, simple types of tasks that I use to add information such as materials, connections, analysis parameters; but i also want to export normals to grid elements: how can i do this without a .bas file and TCL commands?
Thank you very much.

Re: exporting information from GiD via a text file

Posted: Wed Jun 23, 2021 5:02 pm
by escolano
How are you exporting the information a text?
with Files->Export->Text data report...?

In general any standard format will export exactly what you want, and in fact normals is derived information that is not usually exported because it is redundant data. (a dot product of two tangent vectors and an evaluation of partial derivatives in surfaces)

If do you need your own format or kind of data assume that you must export with your custom code (Tcl or .bas template)
why not to do it? it is as simple as write a file xxx.bas in your problemtype (I assume that do you have one because are speaking of 'materials') with few lines like this:

Code: Select all

*set elems(triangle)
*loop elems
*ElemsNum *ElemsNormal
*end elems
then a <modelname>.dat file will be printed with the element id and its normal for all triangles

for more complicated data, can write in your problemtype some Tcl code with a proc that ask GiD data and print it as you want