Page 1 of 1

Different .exe files

Posted: Tue Feb 27, 2024 7:34 pm
by Daniel
Hi,

I would like to set a list of .exe files in data tree.
The .exe files will be located in the file 'exec', just like in the example cmas2d_customlib.

How do I set a specific .exe file in the .tcl file?

Re: Different .exe files

Posted: Fri Mar 01, 2024 12:45 pm
by escolano
I don't understand your question.

1- In Tcl you can ask the files in disk with the standard Tcl 'glob' command
https://www.tcl-lang.org/man/tcl8.6/TclCmd/glob.htm

2- The 'data tree' (I assume you are talking of the customLib treectrl widget + XML dom) doesn't has any special field to store 'exe' names. You can store text information in some tree node if you want.

3-Related to run a simulation from GiD pressing Calculate, GiD will start the file
<problemtype>.win.bat or <problemtype>.unix.bat
(the first in case of Window and the other for the rest: Linux or macOs)
Inside you can specify the .exe to be run, using valid shell command on each case,

on Window can use only a limited collection of 'cmd.exe' commands, the ones explained in GiD customization manual.
on Linux/macOs sh is recommended (because is installed by default in most distros)

Have a look to the cmas2d_customlib problemtype example

Re: Different .exe files

Posted: Fri Mar 01, 2024 7:12 pm
by Daniel
So,

I will build a field in the data tree to store all .exe files avaible. The user will chose one of them.
After that, I must change the name of the .exe in the .unix.bat file. All .exe files will be located in the file 'exec', just like in the example cmas2d_customlib.

How do I change the name of the .exe in the .unix.bat file?

Re: Different .exe files

Posted: Fri Mar 01, 2024 8:04 pm
by Daniel
In place of .unix.bat file, read .win.bat file.