Page 1 of 1
Import automatically by code .STL files
Posted: Mon Oct 09, 2017 1:07 am
by Freddy
It is possible to import several files in .stl format by code
Re: Import automatically by code .STL files
Posted: Mon Oct 09, 2017 11:15 am
by escolano
You can select multiple .stl files in the Windows file browser and draw them over GiD. All of them fill be imported as stl.
By code, at Tcl level, you can import a stl file with
GiD_Process MEscape Files STLRead $filename escape
if there is some previous mesh, before get the name GiD will ask a question:
"Old mesh exists: Erase, Append, Cancel"
you must anticipate it and provide the answer you want, e.g. to append must use the word AddNoShare:
GiD_Process MEscape Files STLRead AddNoShare $filename escape
Note: You can know if a previous mesh exists with [lindex [GiD_Info mesh] 0] that is the number of meshes
Note: In general, you can know the keywords of the process commands used by GiD doing the operation as user and opening the 'Undo' window (Utilities->Undo...), here you will see in this case the words MEscape Files STLRead AddNoShare $filename escape (where filename is the final name, not a Tcl variable like my code example)
Re: Import automatically by code .STL files
Posted: Mon Oct 09, 2017 3:31 pm
by Freddy
Perfect. Thank you very much!