#=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
#                                      numgeo - GiD interface
#                       Copyright (C) 2023-today Jan Machacek, Rahul Dogra
#=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~
#
# Procedures to run python files from within GID
#
# History
# - 16.04.2025, J. Machacek - Initial version
#
#=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~~=~=~

proc numgeo::RunPythonExample { project_name basename } {
  set problemtype_tail [file tail [GiD_Info Project ProblemType]] 
  set filename_bat $problemtype_tail.win.bat
  if { $::tcl_platform(platform) != "windows" } {
    set filename_bat $problemtype_tail.unix.bat
  }
  # It is important to add the filename_bat at the beginning, otherwise GiD will not find the bat file
  # The four original arguments are still provided to the bat file, although not specified here
  # dont understand why, but it is like this, so append only the new ones
  set result [list $filename_bat]
  return $result
}