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?
Different .exe files
Moderator: GiD Team
Re: Different .exe files
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
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
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?
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
In place of .unix.bat file, read .win.bat file.