These commands return more than one value in a prescribed order, writing them one after the other. All of them except LocalAxesDef are able to return one single value when a numerical argument giving the order of the value is added to the command. In this way, these commands can appear within an expression. Neither LocalAxesDef nor the rest of the commands without the numerical argument can be used inside expressions. Below, a list of the commands with the appropriate description is displayed.
 *NodesCoord. This command writes the node's coordinates. It must be inside a loop (see *loop) over the nodes or elements. The coordinates are considered as real numbers (see *realformat and *format). It will write two or three coordinates according to the number of dimensions the problem has (see *Ndime).
If *NodesCoord receives an integer argument (from 1 to 3) inside a loop of nodes, this argument indicates which coordinate must be written: x, y or z. Inside a loop of nodes:
*NodesCoord writes three or two coordinates depending on how many dimensions there are.
*NodesCoord(1) writes the x coordinate of the actual node of the loop.
*NodesCoord(2) writes the y coordinate of the actual node of the loop.
*NodesCoord(3) writes the z coordinate of the actual node of the loop.
If the argument real is given, the coordinates will be treated as real numbers.
Example: using *NodesCoord inside a loop of nodes
Coordinates:
Node X Y
*loop nodes
*format "%5i%14.5e%14.5e"
*NodesNum *NodesCoord(1,real) *NodesCoord(2,real)
*end nodes
This command effects a rundown of all the nodes in the mesh, listing their identifiers and coordinates (x and y).
The contents of the project_name.dat file could be something like this:
Coordinates:
Node X Y
1 1.28571e+001 1.92931e+000
2 1.15611e+001 2.13549e+000
3 1.26436e+001 5.44919e001
4 1.06161e+001 1.08545e+000
5 1.12029e+001 9.22373e002
...
*NodesCoord can also be used inside a loop of elements. In this case, it needs an additional argument that gives the local number of the node inside the element. After this argument it is also possible to give which coordinate has to be written: x, y or z.
Inside a loop of elements:
*NodesCoord(4) writes the coordinates of the 4th node of the actual element of the loop.
*NodesCoord(5,1) writes the x coordinate of the 5th node of the actual element of the loop.
*NodesCoord(5,2) writes the y coordinate of the 5th node of the actual element of the loop.
*NodesCoord(5,3) writes the z coordinate of the 5th node of the actual element of the loop.
 *ElemsConec. This command writes the element's connectivities, i.e. the list of the nodes that belong to the element, displaying the direction for each case (anticlockwise direction in 2D, and depending on the standards in 3D). For shells, the direction must be defined. However, this command accepts the argument swap and this implies that the ordering of the nodes in quadratic elements will be consecutive instead of hierarchical. The connectivities are considered as integers (see *intformat and *format).
If *ElemsConec receives an integer argument (begining from 1), this argument indicates which element connectity must be written:
*loop elems
all conectivities: *elemsconec
first conectivity *elemsconec(1)
*end elems
Note: In the first versions of GiD, the optional parameter of the last command explained was invert instead of swap, as it is now. It was changed due to technical reasons. If you have an old .bas file prior to this specification, which contains this command in its previous form, when you try to export the calculation file, you will be warned about this change of use. Be aware that the output file will not be created as you expect.

*GlobalNodes. This command returns the nodes that belong to an element's face where a condition has been defined (on the loop over the elements). The direction for this is the same as for that of the element's connectivities. The returned values are considered as integers (see
*intformat and*format ).If*GlobalNodes receives an integer argument (beginning from 1), this argument indicates which face connectity must be written.
So, the local numeration of the faces is:
Triangle: 12 23 31
Quadrilateral: 12 23 34 41
Tetrahedra: 123 243 341 421
Hexahedra: 1234 1485 1562 2673 3784 5876
Prism: 123 1452 2563 3641 456
Pyramid: 1234 152 253 354 451
 *LocalNodes. The only difference between this and the previous one is that the returned value is the local node's numbering for the corresponding element (between 1 and nnode).
 *CondElemFace. This command return the number of face of the element where a condition has been defined (beginning from 1). The information is equivalent to the obtained with the localnodes command
 *ElemsNnode. This command returns the number of nodes of the current element (valid only inside a loop over elements).
Example:
*loop elems
*ElemsNnode
*end elems
 *ElemsNnodeCurt. This command returns the number of vertex nodes of the current element (valid only inside a loop over elements). For example, for a quadrilateral of 4, 8 or 9 nodes, it returns the value 4.
 *ElemsNNodeFace. This command returns the number of face nodes of the current element face (valid only inside a loop over elements onlyincond, with a previous *set cond of a condition defined over face elements).
Example:
*loop elems
*ElemsNnodeFace
*end elems
 *ElemsNNodeFaceCurt. This command returns the short (corner nodes only) number of face nodes of the current element face (valid only inside a loop over elements onlyincond, with a previous *set cond of a condition defined over face elements).
Example:
*loop elems
*ElemsNnodeFaceCurt
*end elems
 *ElemsType: This returns the current element type as a integer value: 1=Linear, 2=Triangle, 3=Quadrilateral, 4=Tetrahedra, 5=Hexahedra, 6=Prism, 7=Point,8=Pyramid,9=Sphere,10=Circle. (Valid only inside a loop over elements.)

*ElemsTypeName: This returns the current element type as a string value:
Linear, Triangle, Quadrilateral, Tetrahedra, Hexahedra, Prism, Point, Pyramid, Sphere, Circle . (Valid only inside a loop over elements.)
 *ElemsCenter: This returns the element center. (Valid only inside a loop over elements.)
Note: This command is only available in GiD version 9 or later.
 *ElemsRadius: This returns the element radius. (Valid only inside a loop over sphere or Circle elements.)
Note: This command is only available in GiD version 8.1.1b or later.
 *ElemsNormal. This command writes the normal's coordinates. It must be inside a loop (see *loop) over elements, and it is only defined for triangles, quadrilaterals, and circles (and also for lines in 2D cases).
If *ElemsNormal receives an integer argument (from 1 to 3) this argument indicates which coordinate of the normal must be written: x, y or z.
 *LocalAxesDef. This command returns the nine numbers that define the transformation matrix of a vector from the local axes system to the global one.
Example:
*loop localaxes
*format "%10.4lg %10.4lg %10.4lg"
x'=*LocalAxesDef(1) *LocalAxesDef(4) *LocalAxesDef(7)
*format "%10.4lg %10.4lg %10.4lg"
y'=*LocalAxesDef(2) *LocalAxesDef(5) *LocalAxesDef(8)
*format "%10.4lg %10.4lg %10.4lg"
z'=*LocalAxesDef(3) *LocalAxesDef(6) *LocalAxesDef(9)
*end localaxes
 *LocalAxesDef(EulerAngles). This is as the last command, only with the EulerAngles option. It returns three numbers that are the 3 Euler angles (radians) that define a local axes system
How to calculate X[3] Y[3] Z[3] orthonormal vector axes from three euler angles angles[3]
Y[0]= cosC*sinA + sinC*cosB*cosA
Y[1]= sinC*sinA + cosC*cosB*cosA
Y[2]= sinB*cosA
Z[0]= sinC*sinB
Z[1]= cosC*sinB
Z[2]= cosB
where
cosA=cos(angles[0])
sinA=sin(angles[0])
cosB=cos(angles[1])
sinB=sin(angles[1])
cosC=cos(angles[2])
sinC=sin(angles[2])
How to calculate euler angles angles[3] from X[3] Y[3] Z[3] orthonormal vector axes
if(Z[2]<1.0EPSILON && Z[2]>1.0+EPSILON){
double senb=sqrt(1.0Z[2]*Z[2]);
angles[1]=acos(Z[2]);
angles[2]=acos(Z[1]/senb);
if(Z[0]/senb<0.0) angles[2]=M_2PIangles[2];
angles[0]=acos(Y[2]/senb);
if(X[2]/senb<0.0) angles[0]=M_2PIangles[0];
} else {
angles[1]=acos(Z[2]);
angles[0]=0.0;
angles[2]=acos(X[0]);
if(X[1]<0.0) angles[2]=M_2PIangles[2];
}
 *LocalAxesDefCenter. This command returns the origin of coordinates of the local axes as defined by the user. The "Automatic" local axes do not have a center, so the point (0,0,0) is returned. The index of the coordinate (from 1 to 3) can optionally be given to LocalAxesDefCenter to get the x, y or z value.
Example:
*LocalAxesDefCenter
*LocalAxesDefCenter(1) *LocalAxesDefCenter(2) *LocalAxesDefCenter(3)