/
*Tcl
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}] }
Related content
File
More like this
Extra functions
Extra functions
More like this
How to print in the calc file the number of the layer which an element belongs to
How to print in the calc file the number of the layer which an element belongs to
More like this
Tcl/Tk example
Tcl/Tk example
More like this
write_template
write_template
More like this
edit_command
edit_command
More like this
COPYRIGHT © 2022 · GID · CIMNE