*sortelements()
Sets the order that elements are output in an *elements() block.
Syntax
*sortelements (order)
Type
HyperMesh Template Command
Description
Sets the order that elements are output in an *elements() block.
This command must be inside a standalone *elements() block (that is a block not inside another block like *components()) and should be called in the *before() section.
Inputs
- order
- Valid values are:
Example
To output elements in order based on material ID:
*elements(0,0,"","")
  *before()
    *variableset(variable1,0)
    *sortelements(bymaterialid)
  *format()
    *if([variable1 != collector.materialid])
      *string("Elements in material")
      *field(integer,collector.materialid,0)
      *end()
      *variableset(variable1,collector.materialid)
    *endif()
    *string("id = ")
    *field(integer,id,0)
    *end()
*output()To output elements in order based on ID:
*elements(0,0,"","")
  *before()
    *sortelements(byid)
  *format()
    *string("id = ")
    *field(integer,id,0)
    *end()
*output()