Page 1 of 1

Output variable values using WarningBox

Posted: Thu Apr 12, 2018 3:37 pm
by awa5114
I am working on a bas file and I need to output some information to 'debug' it

I'd like to do something like this:

*WarningBox NodesCoord(1,real) *NodesCoord(2,real) *NodesCoord(3,real)

Instead of outputing the nodal values I am simply getting the text of the command itself. How do I get the values to show up in the WarningBox?

Thanks!

Re: Output variable values using WarningBox

Posted: Mon Apr 16, 2018 10:46 am
by escolano
If do you have a line like
*NodesCoord(1,real) *NodesCoord(2,real) *NodesCoord(3,real)
you can directly see the content of the .dat calculation file.
(but maybe there is some data pending to be flushed to the file, until the file is closed)

And maybe you can use a *tcl command to do what you want.
*tcl(WarnWinText *NodesCoord(1,real))

WarnWinText is a tcl procedure defined in GiD to show a modeless message window.
before invoke the tcl procedure GiD try to replace the .bas command *NodesCoord(1,real) by its value.