GiD - The personal pre and post processor
*Tcl
*Tcl This command allows information to be printed using the Tcl extension language. The argument of this command must be a valid Tcl command or expression which must return the string that will be printed. Typically, the Tcl command is defined in the Tcl file (.tcl , see TCL AND TK EXTENSION for details).
Example: In this example the *Tcl command is used to call a Tcl function defined in the problem type .tcl file. That function can receive a variable value as its argument with *variable. It is also possible to assign the returned value to a variable, but the Tcl procedure must return a numerical value.
In the .bas file:
*set var num=1 *tcl(WriteSurfaceInfo *num) *set var num2=tcl(MultiplyByTwo *num)
In the .tcl file:
proc WriteSurfaceInfo { num } { return [GiD_Info list_entities surfaces $num] } proc MultiplyByTwo { x } { return [expr {$x*2}] }
COPYRIGHT © 2022 · GID · CIMNE