主要内容

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

removeProperty

从构造型中删除属性

说明

removeProperty(stereotype,propertyName) 从构造型中删除一个属性。

示例

示例

全部折叠

添加一个组件构造型,并添加一个 VoltageRating 属性,其值为 5。然后删除该属性。

profile = systemcomposer.profile.Profile.createProfile("myProfile");
stereotype = addStereotype(profile,"electricalComponent",AppliesTo="Component")
property = addProperty(stereotype,"VoltageRating",DefaultValue="5");
removeProperty(stereotype,"VoltageRating")

输入参数

全部折叠

构造型,指定为 systemcomposer.profile.Stereotype 对象。

要删除的属性名称,指定为字符向量或字符串。

数据类型: char | string

详细信息

全部折叠

版本历史记录

在 R2019a 中推出