| Contents | Index |
To generate an HTML code generation report:
With your ERT-based model open, open the Configuration Parameters dialog box or Model Explorer and navigate to the Code Generation > Report pane.
Select Create code generation report if it is not already selected. By default, Launch report automatically and Code-to-model also are selected, and Model-to-code is cleared, as shown in the following figure.
You can select or clear any of these options.

Generate code from your model or subsystem (for example, for a model, by clicking Build on the Code Generation pane of the Configuration Parameters dialog box).
The build process writes the code generation report files in the html subdirectory of the build directory. The top-level HTML report file is named model_codegen_rpt.html or subsystem_codegen_rpt.html.
If you selected Launch report automatically, the build process automatically opens a MATLAB Web browser window and displays the code generation report.
If you did not select Launch report automatically, you can open the code generation report (model_codegen_rpt.html or subsystem_codegen_rpt.html) manually into a MATLAB Web browser window, or into another Web browser.
If you selected Code-to-model, hyperlinks to blocks in the generating model are created in the report files. When you view the report files in a MATLAB Web browser, clicking on these hyperlinks displays and highlights the referenced blocks in the model. For more information, see Tracing Code to Model Objects Using Hyperlinks.
If you selected Model-to-code, model-to-code highlighting support is included in the generated HTML report. To highlight the generated code for a block in your Simulink model, right-click the block and select Code Generation > Navigate to Code. This selection highlights the generated code for the block in the HTML code generation report. For more information, see Tracing Model Objects to Generated Code.
For large models (containing over 1000 blocks), you might find that HTML report generation takes longer than you want. In this case, consider clearing the Code-to-model and Model-to-code check boxes. The report will be generated faster.
You can also view the HTML report files, as well as the generated code files, in the Simulink Model Explorer. For details, see Viewing Generated Code in the Model Explorer Code Viewer in the Simulink Coder documentation.
![]() | About HTML Code Generation Report Extensions | Analyze the Generated Code Interface | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |