About the Text Parser Adapter

You use the Text Parser adapter to write parameters to a file or to read parameters from a file.

See Also
About Markers

The Text Parser adapter can do either of the following:

  • Write to an ASCII file that will be read by an external application, such as an Abaqus (.inp) or Nastran (.dat) input file.
  • Read data from an ASCII file generated by an external applications, such as an Abaqus (.dat) or Nastran (.op2) results file.

The Text Parser adapter provides the following text parsing tools:

General Parser
The general parser supports parsing parameters from a region of a text file or from columns of data in a text file.
Fast Parser
The fast parser also supports parsing parameters from a region of a text file. The fast parser is a simple and fast parser, especially for inserting parameters into input files. Unlike the general parser, the data must be in the same relative position on successive lines because there is no way to skip lines. Only fixed-length columns are supported.
Attribute Values
You use the attribute values parser to read attributes from or write attributes to an XML file. Automation Process Composer (web) uses the XML attributes file to define the attributes in an attributes group.
Parameter Values
You use the parameter values parser to read parameters from an XML file or from a file containing name-value pairs. You can also use the parameter values parser to write parameters to an XML file or to a file containing name-value pairs.

The general text parser and the fast parser are general-purpose text parsers that you can configure to perform the necessary parsing. You can use the general-purpose text parsers to write the value of a parameter into a file or to read data from a file and use the data to set the value of a parameter. The parameter can be a single value (scalar parameter) or an array of values (array parameter).

In addition, you can use the general-purpose text parsers to copy data from one file to another file, or you can use them to look up reference data in a read-only file. If necessary, data can be read from and written to the same file. The Text Parser adapter can process multiple files at one time.

The general parser is recommended for most models because it is the most powerful and the most flexible parsing tool. The fast parser is preferable if you are reading or writing large arrays, and you can operate within the limitations of the fast parser. The fast parser is also preferable if you are working with large files, because you can use markers to operate on only small portions of the file.