Different .exe files

Moderator: GiD Team

Post Reply
Daniel
Posts: 20
Joined: Fri Feb 03, 2023 4:08 pm

Different .exe files

Post 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?
User avatar
escolano
Posts: 1920
Joined: Sun Sep 05, 1982 10:51 pm

Re: Different .exe files

Post 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
Daniel
Posts: 20
Joined: Fri Feb 03, 2023 4:08 pm

Re: Different .exe files

Post 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?
Daniel
Posts: 20
Joined: Fri Feb 03, 2023 4:08 pm

Re: Different .exe files

Post by Daniel »

In place of .unix.bat file, read .win.bat file.
Post Reply