Output variable values using WarningBox

Moderator: GiD Team

Post Reply
awa5114
Posts: 43
Joined: Thu Jan 26, 2017 5:10 pm

Output variable values using WarningBox

Post 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!
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Output variable values using WarningBox

Post 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.
Post Reply