# Text Data File Format

The format of the text data file is a record by record file with fields separated by tabs or commas. Three different versions of this file can be used:

  • gwa - default text file
  • csv - comma separated text file
  • txt - tab separated text file

With the default (.gwa) file extension the file is read/written in an international format. This is recommended where files have to be transferred between offices in different countries. The alternative options read/write files using the local settings for decimal points and list separators (see 'Windows Settings') for ease of importing the files into spreadsheets.

Each record consists of a keyword and a number of fields each separated with a tab (comma or semicolon if in CSV format). There may only be one record per line, but a record may be continued on more than one line. To spread a record over several lines a continuation marker (a ) should be placed in the next field position on that line. Comments can be included in the file on any line after a comment marker (an !) character. The \ should precede any comments and anything after the continuation marker will be treated as a comment. Both comments and continuation characters should be separated from the fields by a tab. Blank lines (no space or tab characters) are acceptable. A blank field is interpreted as a null string for string fields and a zero for numeric fields.

With any of the text file formats the files can be written in either SI or model units. In any file the units assumed to be SI until a UNIT_ record is encountered. This then changes the units for all subsequent records.

Each record is of the form:

KEY_WORD, value, value, value, value

Where a table is referred to this represents the following input

n, x1, y1, … xn, yn

where n is the number of points, xi is the value of the abscissa and yi is the value of the ordinate.

The syntax of all aspects are described in detail in the Text File Format (opens new window) document.

# Units

GSA data is stored in SI units both in GWB files and in the program. In text files, however, data units are set by UNIT_DATA records, defaulting to SI.

When reading a GWA file GSA registers the current unit for each unit type, defaulting to SI. Units may be adjusted several times in one GWA file. For example, for NODE records that precede any UNIT_DATA LENGTH records coordinates will be read as being in metres; after any UNIT_DATA LENGTH records coordinates in NODE records will be taken as being in the last specified unit of LENGTH.

For clarity, all length related values in GWA records use the LENGTH option and not DISP etc., regardless of the dimension option implemented elsewhere in the program.

When writing GWA files GSA offers the option to export in SI units or model units. When the option to export in model units is taken a set of UNIT_DATA records is written at the top of the file, specifying the current model units, and all data are written in those units.

When used from the COM interface(GwaCommand), the default units while reading the file are model units. It’s worth noting that when using GET GwaCommand, GSA is actually writing a GWA file and while using SET, GSA is reading it in.

# Names

Whenever records have a field for the object name it may be entered in double quotes "..." to specify that any characters forming part of the name are not field separators. GSA outputs names surrounded by quotes whenever a field separator character is part of the name.

# String Ids

Most GSA objects can have an associated string ID (sID). In text files sIDs are assigned as follows:

  • For sIDs to be recognised for any object a sID must first be assigned to the model by a SID record.
  • Then a sID is defined for an object by appending a colon (‘:’) to the keyword; the text following the colon specifies the sID.
  • Having assigned a model sID it is not necessary to assign sIDs to every object.
  • sIDs may not be assigned to subsidiary records such as SEC_MOD records.

Examples of sID usage in GWA files:

SID, {Mesh:assigned}

  • assigns the sID "{Mesh:assigned}" to the model.

NODE:{Mesh:1}, 8, 1.4, 0.0, 4.4,0

  • assigns the sID "{Mesh:1}" to node 8

Refer to string ids for information on sID formatting.

# Format

The format of the specific records are listed in the GWA Keywords Reference (opens new window).