Calling Tcl procedures from Tdyn

Most of the material and data fields of Tdyn may be defined by Tcl procedures. This can be done by using the tcl function, that executes a Tcl script or procedure returning a double value. The syntax of this function is tcl(.) where the argument is the script to be executed. Examples:

tcl(set var) return the value of the Tcl variable var.

tcl(myproc arg) the procedure myproc is called with argument arg. Procedure myproc must be defined in the Tcl script selected in the Tcl extension entry and must return a double value.

Note that in order to use this function, Tcl extension must be activated by selecting Tcl extension .