You can use the information in the Static Code Metrics Report to assess the generated code and make model changes before code implementation in your target IDE.
Before starting, you must familiarize yourself with potential code limitations of your IDE. For example, some IDEs have limits on the number of variables or lines of code in a function block.
For detailed instructions on generating the report, see Generate a Static Code Metrics Report.
This is the basic workflow for using the Static Code Metrics Report with your model.
The Static Code Metrics Report is divided into the following sections:
File Information: Reports high-level information about generated files, such as lines and lines of code.
Global Variables: Reports information about global variables defined in the generated code.
Global Constants: Reports information about global constants defined in the generated code.
Function Block Information: Reports a table of metrics for each function block generated from your model.
You can use the information in the Function Block Information table to assess the generated code before implementation in your IDE. The leftmost column of the table lists function blocks with hyperlinks. Clicking a function block name leads you to the function block location in the generated code. From here, you can trace from the code to the model. For more information, see Trace from Code to Model.