Get Model Objects for Embedded Web View Report

The Embedded Web View report generator slreportgen.webview.EmbeddedWebViewDocument base class provides a set of methods for finding model objects to export to the generated report. You use these methods in the report generator fillContent method to obtain information about the exported objects for the report document.

To find objects to export from the model, use these methods, which are inherited from the slreportgen.webview.EmbeddedWebViewDocument base class of the report generator.

MethodPurpose

getExportModels

Get models to be exported to the report as Web Views.

getExportDiagrams

Get block diagrams to be exported to the report

getExportSimulinkSubSystems

Get subsystem blocks to be exported to the report

getExportStateflowDiagrams

Get Stateflow® charts to be exported to the report

getExportStateflowCharts

Get Stateflow chart elements to be exported in this report

This sample code shows how to get a model to use as the Web View.

function fillContent(rpt)
    import mlreportgen.dom.*  
    model = getExportModels(rpt);
    model = model{1};
    title = Paragraph(sprintf('%s Design Variables', model));
    title.Style = {Bold, Color('white'), BackgroundColor('gray'), ...
                FontFamily('Helvetica'), FontSize('18pt')};
            append(rpt, title);
   …
end

For other tasks to create your Embedded Web View generator, see

To generate the Embedded Web View report, see Generate an Embedded Web View Report.