Main Content

Simulink Workspace Variable Loop

Generates a model variable loop

Description

This component generates a model variable loop used by the Simulink Workspace Variable component to report on those workspace variables that the Simulink® model uses.

You can limit the variables included in the loop to those that match property name and value pairs that you specify. If you want to report on model variables, your report setup file must include this component as a child of a Model Loop component and must include a Simulink Workspace Variable component as its child. Also, in the Report Options dialog box, select Compile model to report on compiled information. For example:

Report Options dialog box with Compile model to report on compiled information selected

Loop Options

  • Sort

    • Alphabetically by text: Sort variables alphabetically by name.

    • By data type: Sort variables alphabetically by data type.

  • Search for Simulink property name/property value pairs: Reports only on the Simulink blocks with the specified property name-value pairs. To enable searching, click the check box. In the first row of the property name and property value table, click inside the edit box, delete the existing text, and type the property name and value.

    To find property names for blocks, use the get_param function or select a block in the model and enter this code at the MATLAB® command line:

    get(gcbh)

Section Options

  • Create section for each object in loop: Inserts a section in the generated report for each object found in the loop.

  • Display the object type in the section title: Automatically inserts the object type into the section title in the generated report. This is only available when Create section for each object in loop is selected.

  • Create link anchor for each object in loop: Create a link target on each object in the loop so that other parts of the report can link to it.

Insert Anything into Report?

Yes, inserts a section if you select Create section for each object in loop and a link target if you select Create link anchor for each object in loop.

Class

rptgen_sl.csl_ws_var_loop