Main Content

Stateflow Snapshot

Insert into report snapshot of Stateflow object


This component inserts a snapshot (screen capture) of a Stateflow® object, defined by the Stateflow Filter parent component, into a report.

This component executes only if the selected object in the Stateflow Filter component is a graphical object, such as Chart, State, Transition, or Frame.

For HTML and Direct PDF (from template) output, the state charts in the resulting image can link to associated report information. To enable this linking, on the Chart Loop component that this component is a descendant of, select the Create link anchor for each object in loop check box. For Direct PDF (from template) output, you also need to set the output format to Automatic SF format or Scalable Vector Graphics.


  • Format: Specifies the image file format. Select Automatic SF Format (default) to choose the format best suited for the specified report output format automatically. Otherwise, choose an image format that your output viewer can read.

    • Automatic SF Format — Select this option, or Scalable Vector Graphics, with Direct PDF (from template) report output format if you are linking the snapshot to related report content.

    • Bitmap

    • JPEG high quality image

    • JPEG low quality image

    • JPEG medium quality image

    • PNG 24–bit image

    • Scalable Vector Graphics

  • Orientation:

    • Portrait

    • Landscape

    • Rotated

    • Largest dimension vertical: Positions the image so that its largest dimension is vertical.

    • Use Chart PaperOrientation setting: Uses the paper orientation setting for the chart. Use the Simulink® PaperOrientation parameter to specify the orientation.

    • Full page image (PDF only): In PDF reports, scales images to fit the full page, minimizes page margins, and maximizes the size of the image by using either a portrait or landscape orientation.

    For more information about paper orientation, see the orient command in the MATLAB® documentation.

  • Image sizing:

    • Shrink image to minimum font size set in Stateflow Hierarchy Loop: Resizes the image so that the text label font size is the minimum font size.

    • Fixed and Zoom: Specifies the size of the image.

  • Scaling: Specifies the percentage of the image size to which to scale it.

  • Max size: Specifies the maximum size for the snapshot in the generated report in the selected units. Use [width, height] format. In the units text box, select Inches, Centimeters, Points, or Normalized.

  • Use printframe: Inserts a frame around your image. Use the default frame or create a custom one.

  • Use printframe paper settings: Uses the dimensions and parameters as set by the specified printframe to size your image. If you choose this option, all other options (except for Image file format) become inactive.


  • Include callouts to describe visible objects: Displays descriptive callouts for visible objects.

  • Insert anchors for transitions and junctions: Inserts anchors for transitions and junctions into the report.

    • None

    • Redundant children only

    • All

  • Run only if Stateflow object has at least the following number of children: Specifies the minimum number of children that the current Stateflow object must have to include in the report. This option is inactive unless the selected object in the parent Stateflow Filter component is a graphical object.


    This option allows you to exclude certain images to decrease the size of the report for large models.

Display Options

  • Scaling:

    • Use image size: Uses the image size that you specify in the snapshot option.

    • Zoom and Fixed size: Allows you to specify the size of the image.

  • Size: Specifies a size in inches for your image. The default is 7-by-9.

  • Max size: Specifies the maximum size of the image in the format [width height]. This field is active only if you choose Zoom from the Scaling selection list.

  • Units: Specifies the units for the size of the image. This field is active only if you choose Zoom or Fixed size in the Image size selection list.

  • Alignment: Only reports in PDF or RTF format support this property.

    • Auto

    • Right

    • Left

    • Center

  • Image title:

    • None: No image title.

    • Object name: Uses the object name as the title.

    • Full Stateflow name: Specifies the Stateflow path and the name of the object.

    • Full Simulink + Stateflow name: Specifies the Simulink path and name of the object.

    • Custom: Enter a different title.

  • Caption: Select or enter a short text description for the snapshot figure.

    • No caption

    • Automatic (use block description). Uses the Simulink block description as the caption.

    • Custom. Specifies a short text description for the snapshot figure.

Insert Anything into Report?

Yes. Image.