Propagate Block Descriptions to Code Comments - MATLAB & Simulink (original) (raw)

Main Content

You can propagate block descriptions from the model to comments in your generated code.

For specific IDEs, you can propagate the block descriptions into specific XML tags in the generated code. The IDEs use the tags to create a readable description of the function blocks in the IDE.

To propagate block descriptions to comments:

  1. Enter a description for the block.
    1. Right-click the block for which you want to write a description and selectProperties.
    2. On the General tab, enter a block description.
  2. Before code generation, specify that block descriptions must propagate to code comments.
    1. Right-click the subsystem for which you are generating code and select > .
    2. Select the option Include block description.

Your block description appears as comments in the generated code.