The "ICEM CFD Scripting Basics" section mentions 4 ways to run your script, but does not say that procedures defined with these different methods can communicate with each other.
ICEM CFD has a scripting interpreter, GUI interpreter, and batch interpreter. A Tcl interpreter is an isolated code space that can have certain protections set. Sometimes interpreters can communicate with each other depending on the protections set. When you launch ICEM CFD by command line with the -script argument, it runs this script in the script interpreter. When you run script inside the ICEM CFD message window, by typing individual commands or with the "source" command it is run in the gui interpreter. It is not easy to call functions and variables from the gui interp that are defined in the script interp.
ic_gui_set allows gui_interp access from the script_interp that is used with "icemcfd -script" startup.
one argument retrieves variable value.
two arguments sets a variable value.
Three or more arguments executes a function. Include a blank 3rd argument to make 3 if only sending 1 argument to function.
Only works, though, for procedures that take in 2 arguments or more.
If 3rd arg is blank, such as {}, then it will not return the value of the function. ic_gui_set needs 3 or more non-blank args to return a function value.