Products & Services Solutions Academia Support User Community Company

Learn more about Stateflow   

Printing Stateflow Charts

Printing Scaled Charts

By default, Stateflow software scales each chart that you print to fit on a single page. If you prefer to print charts without scaling to preserve clarity and detail, you can use tiled printing, as described in Using Tiled Printing for Stateflow Charts.

To print scaled charts, follow these steps:

  1. Open the chart or subchart you want to print.

  2. In the Stateflow Editor, select File > Print.

    The Print Model dialog box appears:

  3. In the Print Model dialog box, select your printer and number of copies.

  4. Select the charts you want to print by choosing one of these options:

    OptionDescription
    Current systemPrints the current chart or subchart
    Current system and abovePrints the current chart or subchart and all systems above it in the model hierarchy
    Current system and belowPrints the current chart or subchart and all systems below it in the model hierarchy, with the option of looking into the contents of masked and library Simulink blocks
    All systemsPrints all systems in the model hierarchy, with the option of looking into the contents of masked and library Simulink blocks

  5. Customize your print job as needed using these options:

    OptionDescription
    Enable tiled printing for all systems

    Enables tiled printing for all charts and overrides any individual tiled-print settings. See Using Tiled Printing for Stateflow Charts.

    Include Print Log

    Includes a list of all printed charts.

    Look under mask dialog

    Prints the contents of Simulink masked subsystems when encountered at or below the level of the current chart or subchart (when printing Current system and below) or the top-level system (when printing All systems).

    Expand unique library links

    Prints the contents of library blocks that appear in Simulink subsystems that are printed with Current system and below or All systems.

    Frame

    Prints a title block frame with each chart.

    To learn how to create print frames, see PrintFrame Editor Overview in the Simulink User's Guide.

  6. Click OK.

For more information about all print options, see Printing a Block Diagram in the Simulink software documentation.

Using Tiled Printing for Stateflow Charts

Stateflow charts support Simulink tiled printing options (see Tiled Printing in the Simulink documentation). Tiled printing enables you to print Stateflow charts without scaling to fit a page and, therefore, without sacrificing clarity and detail. With tiled printing, you can distribute a chart over a specified number of pages and, therefore, control the total size of the printed image. You can choose different tiled-print settings for each of your charts to customize the appearance of all printed images.

If you want to scale charts to fit on a single printed page, see Printing Scaled Charts.

Printing Charts on Tiled Pages

To print Stateflow charts on tiled pages, follow these steps:

  1. Open the chart or subchart you want to print.

  2. In the Stateflow Editor, select File > Enable Tiled Printing.

    To enable tiled printing for all systems in your model, select the Enable tiled printing for all systems check box on the Print dialog box

  3. To visualize the chart's size and layout with respect to the page, select View > Show Page Boundaries.

    If your chart is too large to fit on one page, the Stateflow Editor displays the page boundaries as tiles in a checkerboard pattern, as in this example:

    In this chart, state #6 extends beyond the page boundary. To correct the problem, you can select and drag this state to a different tile so that it prints in its entirety on a separate page.

      Note   Stateflow software uses a row-major scheme to number tiled pages. For example, the first page of the first row is 1, the second page of the first row is 2, and so on.

  4. Select File > Print.

    By default, this command prints all of a system's tiled pages. Alternatively, you can specify a range of tiled page numbers to print. See Printing Tiled Pages in the Simulink documentation.

Generating a Model Report

The Print Details report is an extension of the Print Details report in the Simulink model window. It provides a report of Stateflow and Simulink objects relative to the chart currently in view in the Stateflow Editor from which you select the report.

To generate a model report on chart objects, follow these steps:

  1. Open the chart or subchart for which you want a report.

  2. In the Stateflow Editor, select File > Print Details.

    The Print Details dialog box appears as follows:

  3. Enter the destination directory of the report file and select options to specify what objects appear in the report.

    For details on setting the fields in the File locations/naming options section of this dialog box, see Generating a Model Report in the Simulink software documentation. For details on the report you receive from the option you choose in the System reporting options section, see System Report Options and Report Format.

  4. Click Print.

The Print Details dialog box appears and tracks the activity of the report generator during report generation. See Generating a Model Report in the Simulink software documentation for more details on this window.

If no serious errors occur, the HTML report appears in your default browser.

System Report Options

Reports for the current Stateflow chart vary with your choice of one of the System reporting options fields:

Report Format

The general top-down format of the Print Details report is as follows:

Printing the Current Chart

The Print Current View option prints an individual chart or subchart as follows:

  1. Open the chart or subchart that you want to print.

  2. In the Stateflow Editor, select File > Print Current View.

  3. In the submenu, choose one of these options:

    • To File — Converts the current view to a graphics file.

      Select the format for the graphics file from a submenu of graphical file types.

    • To Clipboard — Copies the current view to the system clipboard.

      Select the format for the clipboard copy from a submenu of graphical formats.

    • To Figure — Converts the current view to a MATLAB figure window.

    • To Printer — Prints the current view on the current printer.

You can also print the current view from the MATLAB command line using the sfprint function.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS