19.5. Capturing a Listing

This section describes how to capture the results of a command, either interactively or within a batch run.

The report generator appends listing data to ansysListings.js, a file in your specified report directory containing the JavaScript functions for accessing the listing. (The file contains code to generate HTML as well as comments that hold the list information, allowing you to paste the listing into software other than an HTML document.) The report generator assigns the name listing_n to each captured listing, where n is a sequential numeric identifier beginning at 1 and incrementing as you capture additional listings.

If you intend to use a captured listing in an HTML report (assembled using either the report generator or a third-party HTML tool), be aware that HTML sizes the text smaller if its width is greater than 132 columns; however, all text associated with the listing may still not fit on a printed page.

19.5.1. Interactive

Follow these steps to capture a listing using the report generator GUI:

  1. Click on the Listing Capture button.  

    Result: The Listing Data Capture dialog appears.

  2. Specify a caption for the listing (for example, “Prism Model Area Listing”).

  3. Specify the command to issue to generate the output text.

  4. Click on the OK button.

    Result: The report generator issues this report command to the program and saves the listing:

    ~eui,'ansys::report::datacapture "caption" ansysCommand'

19.5.2. Batch

The following line must appear near the beginning of your batch code before any report commands:

~eui,'package require ansys'

To capture a listing via a batch run, insert this report command at the point in the run where you want to capture a listing:

~eui,'ansys::report::datacapture "caption" ansysCommand'

Release 18.2 - © ANSYS, Inc. All rights reserved.