Main Content

next

Class: systemcomposer.rptgen.finder.ComponentFinder
Namespace: systemcomposer.rptgen.finder

Get next component search result

Since R2022b

Syntax

result = next(finder)

Description

result = next(finder) gets the next Component search result.

Input Arguments

expand all

Component finder, specified as a systemcomposer.rptgen.finder.ComponentFinder object.

Output Arguments

expand all

Component result, returned as a systemcomposer.rptgen.finder.ComponentResult object.

Examples

expand all

Use the ComponentFinder and ComponentResult classes to generate a report.

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

rpt = slreportgen.report.Report(output="ComponentFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Components"));
add(rpt,TableOfContents);

componentFinder = ComponentFinder("mTestModel");
componentFinder.Query = AnyComponent;
  
chapter = Chapter("Components in mTestModel");
  
while hasNext(componentFinder)
    componentResult = next(componentFinder);
    sect = Section(componentResult.Name);
    add(sect,componentResult);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b