Main Content

slreportgen.finder.DataDictionaryResult Class

Namespace: slreportgen.finder
Superclasses: mlreportgen.finder.Result

Data dictionary search result object

Since R2020b

Description

An object of the slreportgen.finder.DataDictionaryResult class represents a result of a search for data dictionaries. You can append a DataDictionaryResult object directly to a report. Alternatively, you can use the getReporter method to access the slreportgen.report.DataDictionary reporter for the result and then customize the reporter and append it to the report.

The slreportgen.finder.DataDictionaryResult class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

You do not create an slreportgen.finder.DataDictionaryResult object explicitly. The slreportgen.finder.DataDictionaryFinder find and next methods create an slreportgen.finder.DataDictionaryResult object for each data dictionary that is found.

Properties

expand all

Public Properties

Additional user-defined information to add to the result, specified as any value.

Attributes:

NonCopyable
true

Data Types: any

Protected Properties

Full path of the data dictionary represented by this result, specified as a string scalar. This property is read-only.

File name of data dictionary represented by this result, specified as a string scalar. This property is read-only.

Methods

expand all

Examples

collapse all

Use the getReporter method of an slreportgen.finder.DataDictionaryResult object to access the data dictionary reporter for the result. Then, customize the reporter by setting its properties.

Import the MATLAB and Simulink Report API packages so that you do not have to use long, fully qualified class names.

import mlreportgen.report.*
import slreportgen.report.*

Create a Simulink report and add a table of contents.

rpt = slreportgen.report.Report("MyReport","html-file");
append(rpt,TableOfContents);

Create a dictionary finder that searches the entire MATLAB path. Find only data dictionaries with names that begin with slrgex__fuelsys.

f = slreportgen.finder.DataDictionaryFinder();
f.Name = "slrgex_fuelsys*";

Create a chapter with a section for each data dictionary result. For each result, customize the reporter to include only the Name, Value, and Class properties in the Design Data summary table.

ch = Chapter("Data Dictionaries");
while hasNext(f)
    result = next(f);
    s = Section(result.Name);
    rptr = getReporter(result);
    rptr.SummaryProperties = ["Name" "Value" "Class"];
    append(s,rptr);
    append(ch,s);
end

Add the chapter to the report. Close and view the report.

append(rpt,ch);
close(rpt);
rptview(rpt);

The report has a section for each of the found dictionaries, slrgex_fuelsys.sldd and slrgex_fuelsys_fuel_rate_control.sldd. The summary table for each dictionary includes only the Name, Value, and Class properties.

designdata1.png

designdata2.png

Version History

Introduced in R2020b