Patent ID: 7849394

Claim:
An electronic device implemented method for generating a code generation report from a simulatable block diagram model comprising a plurality of graphical elements, the simulatable block diagram model provided in a modeling environment, the method comprising: creating a source model representation of the block diagram model in a first language; generating source code in a second language from the source model representation using a code compiler, the second language being distinct from the first language, wherein: the generated source code includes one or more comments in the second language, the one or more comments identifying a corresponding element in the block diagram, and the one or more comments include a block path identifying a section of the source model representation represented in the first language that corresponds to the element in the block diagram model; generating a code generation report from the generated source code using a report compiler, the generating of the code generation report comprising: parsing, using the report compiler, the one or more comments in the generated source code to identify the block path, and replacing the block path with a hyperlink, where the hyperlink: refers to the element of the block diagram model that corresponds to the section of the source model representation identified by the block path, provides a link from the code generation report to the element in the block diagram model, and includes a command that is executable in the modeling environment, the command relating to the element in the block diagram model; and displaying the code generation report to a user.