Issuing Commands from
a user program.
Any LaGriT command can be issued
by calling the subroutine dotask
, for example:
call dotask ('cmo/select/3dmesh;
will select the Mesh Object named 3dmesh.ier1
will be zero if the commands are executed with no error, non-zero otherwise.
A sequence of commands can also be executed using dotask,
call dotask ('cmo/addatt//mo;
will execute the two commands and
then return to the next executable statement. A finish command
must always be the last command in the command list for dotask.
The user should also be aware that mesh object pointers might be changed
by the dotask
commands and should be refreshed using cmo_get_info.
The parser arrays
etc. will not be the same upon return from dotask.
By using the LaGriT command infile,
a series of commands may be executed, for example:
call dotask ('infile/mydeck'; finish',
will execute all the LaGriT commands
that are in the user's file named mydeck.
The final command in the file mydeck
should be finish.
may contain additional infile commands.