Main Content

systemcomposer.rptgen.finder.DictionaryFinder Class

Namespace: systemcomposer.rptgen.finder
Superclasses: mlreportgen.finder.Finder (MATLAB Report Generator)

Find dictionaries

Since R2022b

Description

The systemcomposer.rptgen.finder.DictionaryFinder class searches for information about all the dictionaries in a given System Composer™ architecture model.

Creation

finder = DictionaryFinder(Container) creates a finder that finds all dictionaries in an architecture model specified by the Type property to search for model dictionaries or reference dictionaries.

Note

This finder provides these options to get search results:

  • To return the search results as an array, use the find method. Add the results directly to a report or process the results in a for-loop.

  • To iterate through the results one at a time, use the hasNext and next methods in a while-loop.

Neither option has a performance advantage.

Properties

expand all

Architecture model filename without the .slx extension, specified as a string.

Example: f = DictionaryFinder("ArchModel")

Data Types: string

Filter to find data dictionaries, specified as one of these options:

  • "Model" to find dictionaries in the model.

  • "Dictionary" to find reference dictionaries.

  • "All" to find all dictionaries both model and reference.

Attributes:

GetAccess
public
SetAccess
public

Data Types: string

Properties of objects to find, specified as a cell array of name-value arguments. The finder returns only objects that have the specified properties with the specified values.

Example: f.Properties = {'Gain','5'}

Data Types: char

Methods

expand all

Examples

collapse all

Use the DictionaryFinder and DictionaryResult classes to generate a report.

import mlreportgen.report.*
import slreportgen.report.*
import systemcomposer.rptgen.finder.*

scKeylessEntrySystem
model_name = "KeylessEntryArchitecture";
model = systemcomposer.loadModel(model_name);
rpt = slreportgen.report.Report(output="DictionaryFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Dictionaries in %s Model',model_name)));
add(rpt,TableOfContents);

dictFinder = DictionaryFinder(model_name);

chapter = Chapter("Title","Dictionaries");
while hasNext(dictFinder)
    dict = next(dictFinder);
    sect = Section("Title",dict.Name);
    add(sect,dict);
    add(chapter,sect);
end

add(rpt,chapter);
close(rpt);
rptview(rpt)

Version History

Introduced in R2022b