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 in the lib subdirectory of the IDL distribution.

Calling Sequence

Result = ASCII_TEMPLATE( [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.



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.


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


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.


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

myTemplate = ASCII_TEMPLATE(myFile)

See Also