getDiagramReporter
Class: slreportgen.finder.BlockResult
Namespace: slreportgen.finder
Returns Diagram reporter for this block result
Syntax
reporter = getDiagramReporter(result)
Description
returns a diagram reporter
= getDiagramReporter(result
)reporter
if the block result
contains a subsystem or chart block. The reporter generates a snapshot of the block's diagram
or chart, respectively. If the block result
contains any other type of
block, this method returns empty, []
. To include a diagram of the subsystem
or chart block search result
in a report, add this
reporter
to the report, either directly or via a Chapter or Section
reporter.
Input Arguments
Output Arguments
Examples
Add Block Diagram to Report
Add a subsystem snapshot and property table of the Controller block subsystem of the f14 model to a report.
model_name = 'f14'; openExample(model_name) import slreportgen.report.* import slreportgen.finder.* import mlreportgen.report.* rpt = slreportgen.report.Report('output','pdf'); chapter = Chapter(); chapter.Title = 'Block Diagram Reporter Example'; blkFinder = BlockFinder(model_name); blocks = find(blkFinder); for block = blocks if block.Name == "Controller" rptr = getDiagramReporter(block); section = Section(Title=strrep(block.Name, newline,' ')); add(section,rptr); add(section,block); add(chapter,section); end end add(rpt,chapter) rptview(rpt)
Version History
Introduced in R2018b