File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,12 +107,12 @@ proc Kratos::Event_InitProblemtype { dir } {
107107 # Problemtype libraries as CustomLib
108108 Kratos::LoadProblemtypeLibraries
109109
110- # Load the Kratos problemtype global and user environment (stored preferences)
111- Kratos::LoadEnvironment
112-
113110 # Load launch modes
114111 Kratos::LoadLaunchModes
115112
113+ # Load the Kratos problemtype global and user environment (stored preferences)
114+ Kratos::LoadEnvironment
115+
116116 # Customize GiD menus to add the Kratos entry
117117 Kratos::UpdateMenus
118118
@@ -158,7 +158,8 @@ proc Kratos::InitGlobalVariables {dir} {
158158 # Place were the logs will be placed
159159 set Kratos::kratos_private(model_log_folder) " "
160160 # Check exec/launch.json
161- set Kratos::kratos_private(launch_configuration) " local"
161+ set Kratos::kratos_private(configurations) [list ]
162+ set Kratos::kratos_private(launch_configuration) " "
162163
163164 # Variable to store the Kratos menu items
164165 set kratos_private(MenuItems) [dict create]
Original file line number Diff line number Diff line change @@ -340,7 +340,6 @@ proc Kratos::pythonVersion {{pythonExecutable "python"}} {
340340 return 0
341341}
342342
343-
344343proc Kratos::GetLaunchConfigurationFile { } {
345344 set new_dir [file join $::env(HOME) .kratos_multiphysics]
346345 set file [file join $new_dir launch_configuration.json]
@@ -358,4 +357,14 @@ proc Kratos::LoadLaunchModes { } {
358357 set source [file join $::Kratos::kratos_private(Path) exec launch.json]
359358 file copy -force $source $file
360359 }
360+
361+ # Load configurations
362+ Kratos::LoadConfigurationFile $file
363+ }
364+
365+ proc Kratos::LoadConfigurationFile {config_file} {
366+ if {[file exists $config_file ] == 0} { error " Configuration file not found: $config_file " }
367+
368+ set dic [Kratos::ReadJsonDict $config_file ]
369+ set ::Kratos::kratos_private(configurations) [dict get $dic configurations]
361370}
You can’t perform that action at this time.
0 commit comments