Main Content

find

Class: systemcomposer.rptgen.finder.ConnectorFinder
Namespace: systemcomposer.rptgen.finder

Find information about connector

Since R2022b

Syntax

result = find(finder)

Description

result = find(finder) finds information about a connector for the Connector search result.

Input Arguments

expand all

Connector finder, specified as a systemcomposer.rptgen.finder.ConnectorFinder object.

Output Arguments

expand all

Connector result, returned as a systemcomposer.rptgen.finder.ConnectorResult object.

Examples

expand all

Use the ConnectorFinder and ConnectorResult 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="ConnectorResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title",sprintf('Connectors in %s Model',model_name)));
add(rpt,TableOfContents);

connectorFinder = ConnectorFinder(model_name);
connectorFinder.Filter = "Component";
connectorFinder.ComponentName = "scExampleSmallUAVModel/Flight Support Components";
chapter = Chapter("Title","Connectors");
result = find(connectorFinder);
add(rpt,chapter);

for r = result
    reporter = getReporter(r);
    append(rpt,reporter);
end

close(rpt);
rptview(rpt)

Version History

Introduced in R2022b