*bags()
Starts a bag output block.
Syntax
*bags
()Type
HyperMesh Template Command
Description
This command starts a bag output block. All bag entities in the HyperMesh database are output according to the user-defined format in this block.
Example
The following code outputs the ID and coordinates of every node that exists in all bags of configuration 1.
*bags()
 *format()
 *setcurrentbagentitytype(nodes)
 *if([config == 1])
   *if([entitylistmax > 0])
     *string("$")
     *end()
     *string("$  GRID Data For ")
     *field(string,name,0)
     *string(": ")
     *end()
     *string("$")
     *end()
   *endif()
   *counterset(counter1,0)
   *loopif([counter1 < entitylistmax])
     *pointerset(pointer1,entitylist,counter1)
     *string("GRID    ")
     *fieldleft(integer,pointer1.pointervalue,8)
     *variableset(variable1,[@getentityvalue(nodes,pointer1.pointervalue,x)])
     *field(real,variable1,8)
     *variableset(variable1,[@getentityvalue(nodes,pointer1.pointervalue,y)])
     *field(real,variable1,8)
     *variableset(variable1,[@getentityvalue(nodes,pointer1.pointervalue,z)])
     *field(real,variable1,8)
     *end()
     *counterset(counter1,[counter1+1])
   *endloop()
   *end()
   *string("$-------------------------------------------------")
   *end()
   *string("$-------------------------------------------------")
   *end()
  *endif()
*output()