HOW TO

Display an ASCII text file in a pop-up window using Avenue

Last Published: April 25, 2020

Summary

The following Avenue script displays an ASCII text file in a pop-up window.

Procedure



  1. Open a new script window.

    A. Activate the Project window.
    B. Click the Scripts icon.
    C. Click New.

  2. Paste the following code into the new script window:

    Code:
    myFile = LineFile.Make("<ascii_text_file_name".AsFilename,#FILE_PERM_READ)
    VeryLongString = myFile.ReadElt
    while (myFile.IsAtEnd.Not)
    VeryLongString = VeryLongString + NL + myFile.ReadElt
    end
    myFile.Close
    MsgBox.Report(VeryLongString,"")


    Note:
    Replace the text "<ascii_text_file_name>" with the path to the text file you would like view.

  3. Select compile from the Script menu or click the
    [O-Image] Script compile button
    button.
  4. Click the
    [O-Image] Run compiled script button
    button to run the script.

Article ID:000003977

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic