主要内容

本页采用了机器翻译。点击此处可查看英文原文。

find

类: systemcomposer.rptgen.finder.AllocationListFinder
命名空间: systemcomposer.rptgen.finder

查找与组件相关的分配(包括分配给组件和从组件分配的项)

自 R2022b 起

语法

result = find(finder)

说明

result = find(finder)AllocationList 搜索结果查找分配到或分配自特定组件的数据。

输入参数

全部展开

分配列表查找器,指定为 systemcomposer.rptgen.finder.AllocationListFinder 对象。

输出参量

全部展开

分配列表结果,以 systemcomposer.rptgen.finder.AllocationListResult 对象形式返回。

示例

全部展开

使用 AllocationListFinderAllocationListResult 类生成报告。

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

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

allocationListFinder = AllocationListFinder("AllocationSet.mldatx");
allocationListFinder.ComponentName = "mTestModel/Component1";
chapter = Chapter("Title",allocationListFinder.ComponentName);
result = find(allocationListFinder);
reporter = getReporter(result);

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

版本历史记录

在 R2022b 中推出