主要内容

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

close

关闭分配集

    说明

    close(allocSet,force) 关闭分配集 allocSet。如果有任何未保存的更改,除非参量 forcetrue,否则会出现错误。

    提示

    使用 closeAll 关闭所有已加载的分配集。

    示例

    示例

    全部折叠

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

    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");

    获取默认分配方案。

    defaultScenario = getScenario(allocSet,"Scenario 1");

    在模型之间分配组件。

    allocation = allocate(defaultScenario,sourceComp,targetComp);

    关闭分配集,不保存。

    allocSet.close(true)

    打开分配编辑器

    systemcomposer.allocation.editor

    输入参数

    全部折叠

    分配集,指定为 systemcomposer.allocation.AllocationSet 对象。

    强制关闭分配集,指定为 1 (true) 或 0 (false)。

    数据类型: logical

    详细信息

    全部折叠

    版本历史记录

    在 R2020b 中推出