*#FILE_EXTENSION .dxf
*realformat "%15.5f"
*intformat "%7i"
*# Interface GID-AutoCAD DXF R12
*# To export mesh of triangles/quadrilateral/lines
*# Written by Kike III - January 2001. Last update April 2002
*Set var HANDLE=21
  0
SECTION
  2
ENTITIES
*Set elems(Linear)
*Loop elems
  0
LINE
  5
*format "%i"
*HANDLE
*Set var HANDLE=operation(HANDLE(int)+1)
  8
*ElemsLayerName
 10
*NodesCoord(1,1,real)
 20
*NodesCoord(1,2,real)
 30
*NodesCoord(1,3,real)
 11
*NodesCoord(2,1,real)
 21
*NodesCoord(2,2,real)
 31
*NodesCoord(2,3,real)
*End elems
*if(nelem(Triangle) || nelem(Quadrilateral))
  0
POLYLINE
  5
*format "%i"
*HANDLE
*Set var HANDLE=operation(HANDLE(int)+1)
  8
GiD
 66
     1
 10
0.0
 20
0.0
 30
0.0
 70
    64
 71
*npoin
 72
*nelem
*loop nodes
  0
VERTEX
  5
*format "%i"
*HANDLE
*Set var HANDLE=operation(HANDLE(int)+1)
  8
GiD
 10
*NodesCoord(1,real)
 20
*NodesCoord(2,real)
 30
*NodesCoord(3,real)
 70
    192
*end nodes
*Set elems(Triangle)
*Add elems(Quadrilateral)
*Loop elems
  0
VERTEX
  5
*format "%i"
*HANDLE
*Set var HANDLE=operation(HANDLE(int)+1)
  8
*ElemsLayerName
 10
0.0
 20
0.0
 30
0.0
 70
   128
*for(INODO=1;INODO<=elemsnnode;INODO=INODO+1)
*format "%i"
 7*INODO
*elemsConec(*INODO,int)
*end INODO
*end elems
  0
SEQEND
  5
*format "%i"
*HANDLE
*Set var HANDLE=operation(HANDLE(int)+1)
  8
GiD
*endif
  0
ENDSEC
  0
EOF
