ASCII_TEMPLATE

The ASCII_TEMPLATE function presents a graphical user interface (GUI) which generates a template defining an ASCII file format. Templates are IDL structure variables that may be used when reading ASCII files with the READ_ASCII routine. See READ_ASCII for details on reading ASCII files.

This routine is written in the IDL language. Its source code can be found in the file ascii_template.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = ASCII_TEMPLATE( [Filename] )

Arguments

Filename

A string containing the name of a file to base the template on. If Filename is not specified, a dialog allows you to choose a file.

Keywords

BROWSE_LINES

Set this keyword equal to the number of lines that will be read in at a time when the "Browse" button is selected. The default is 50 lines.

CANCEL

Set this keyword to a named variable that will contain the byte value 1 if the user clicked the "Cancel" button or 0 otherwise.

GROUP

The widget ID of an existing widget that serves as "group leader" for the ASCII_TEMPLATE GUI. When a group leader is killed, for any reason, all widgets in the group are also destroyed.

Examples

Use the following command to generate a template structure from the file "myFile".

myTemplate = ASCII_TEMPLATE(myFile)

See Also

READ_ASCII