Main Content

next

Class: systemcomposer.rptgen.finder.ProfileFinder
Namespace: systemcomposer.rptgen.finder

Get next profile search result

Since R2022b

Syntax

result = next(finder)

Description

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

Input Arguments

expand all

Profile finder, specified as a systemcomposer.rptgen.finder.ProfileFinder object.

Output Arguments

expand all

Profile result, returned as a systemcomposer.rptgen.finder.ProfileResult object.

Examples

expand all

Use the ProfileFinder and ProfileResult classes to generate a report.

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

scExampleSmallUAV
model_name = "scExampleSmallUAVModel";
model = systemcomposer.loadModel(model_name);
rpt = slreportgen.report.Report(output="ProfileFinderReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Profiles in %s Model',model_name)));
add(rpt,TableOfContents);

profileFinder = ProfileFinder("UAVComponent");

chapter = Chapter("Title","Profiles");
while hasNext(profileFinder)
    profile = next(profileFinder);
    sect = Section("Title",profile.Name);
    add(sect,profile);
    add(chapter,sect);
end

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

Version History

Introduced in R2022b