主要内容

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

moveInterface

将接口移至另一个数据字典

自 R2023b 起

说明

moveInterface(interface,dictionary) 将接口 interface 移到数据字典 dictionary 中。

示例

示例

全部折叠

创建新模型并获取其架构。

model = systemcomposer.createModel("archModel");
systemcomposer.openModel("archModel");
arch = model.Architecture;

创建一个新的数据字典 Interfaces.sldd,并添加一个新的数据接口 GPSInterface

dictionary = systemcomposer.createDictionary("Interfaces.sldd");
interface = dictionary.addInterface("GPSInterface");

创建第二个数据字典 InterfacesNew.sldd,并添加一个新的数据接口 SSDInterface。将数据字典链接到模型。

newDict = systemcomposer.createDictionary("InterfacesNew.sldd");
newInterface = newDict.addInterface("SSDInterface");
linkDictionary(model,"InterfacesNew.sldd");

GPSInterface 数据接口移动到第二个数据字典 InterfacesNew.sldd 中。

interface.moveInterface(newDict);

查看接口编辑器。确认 GPSInterface 数据接口现在是 InterfacesNew.sldd 数据字典的一部分。

newDict.Interfaces.Name

输入参数

全部折叠

数据字典,指定为 systemcomposer.interface.Dictionary 对象。有关如何创建数据字典的信息,请参阅 createDictionary

详细信息

全部折叠

版本历史记录

在 R2023b 中推出

另请参阅

函数

对象

模块

工具