主要内容

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

systemcomposer.allocation.AllocationSet.find

查找已加载的分配集

    说明

    allocSet = systemcomposer.allocation.AllocationSet.find(name) 在全局名称空间中找到一个已加载的分配集,其名称为 name

    示例

    示例

    全部折叠

    创建两个新模型,每个模型有一个组件。

    mSource = systemcomposer.createModel("Source_Model_Allocation");
    systemcomposer.openModel("Source_Model_Allocation");
    sourceComp = addComponent(get(mSource,"Architecture"),"Source_Component");
    mTarget = systemcomposer.createModel("Target_Model_Allocation");
    systemcomposer.openModel("Target_Model_Allocation");
    targetComp = addComponent(get(mTarget,"Architecture"),"Target_Component");

    创建一个名为 MyNewAllocation 的分配集。

    allocSet = systemcomposer.allocation.createAllocationSet("MyNewAllocation",...
         "Source_Model_Allocation","Target_Model_Allocation");

    查找分配集。

    allocSetFind = systemcomposer.allocation.AllocationSet.find("MyNewAllocation")
    allocSetFind = 
    
      AllocationSet with properties:
    
                Name: 'MyNewAllocation'
         Description: ''
           Scenarios: [1×1 systemcomposer.allocation.AllocationScenario]
               Dirty: 1
        NeedsRefresh: 0
                UUID: '96e34f0d-fceb-4fb0-872d-2e588308d0e9'
         SourceModel: [1×1 systemcomposer.arch.Model]
         TargetModel: [1×1 systemcomposer.arch.Model]

    输入参数

    全部折叠

    分配集的名称,指定为字符向量或字符串。

    示例: "MyNewAllocation"

    数据类型: char | string

    输出参量

    全部折叠

    分配集,以 systemcomposer.allocation.AllocationSet 对象的形式返回。

    详细信息

    全部折叠

    版本历史记录

    在 R2020b 中推出