oaEnumProp
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaEnumProp 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaEnumProp 当前在 oapy 中可用的 Python 接口。
详细说明
The oaEnumProp is a property that has a string value as well as an array of strings that constitute the set of allowed values。 This array of "enum values" can be used by a generic property editor to assist a user to enter a proper value。 Properties are application-defined values that can be added to any managed object in oaDesign , oaTech , and oaWafer databases except for the following paged objects: oaDevice , oaNode , oaParasiticNetwork , and oaSubNetwork 。 To create properties on DM Objects, create the corresponding oaDMData object (using oaLibDMData::open , oaCellDMData::open , oaViewDMData::open , or oaCellViewDMData::open ), then create properties on that oaDMData object。 See oaProp for a general discussion of properties。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getValue(value) |
| ✅ | obj.setValue(value) |
| ✅ | obj.getEnums() |
| ✅ | _base.oaEnumProp.create(object, name, value, numEnums, enums) |
| ✅ | _base.oaEnumProp.create(object, name, value, enums) |
方法说明
obj.getValue(value)
绑定状态: 已绑定
Python 调用: obj.getValue(value)
This function returns the value of this property。 从 oaProp 重新实现。
Python 示例
from oapy._oa import _base
# assume obj is a oaEnumProp
obj.getValue(value)
obj.setValue(value)
绑定状态: 已绑定
Python 调用: obj.setValue(value)
This function sets this property to the specified value。
异常
oacInvalidEnumValue。
Python 示例
from oapy._oa import _base
# assume obj is a oaEnumProp
obj.setValue(value)
obj.getEnums()
绑定状态: 已绑定
Python 调用: obj.getEnums()
This function returns a collection of the valid enums for this property。
Python 示例
from oapy._oa import _base
# assume obj is a oaEnumProp
obj.getEnums()
_base.oaEnumProp.create(object, name, value, numEnums, enums)
绑定状态: 已绑定
Python 调用: _base.oaEnumProp.create(object, name, value, numEnums, enums)
This function creates an enumerated property with the specified attributes。 An exception is thrown if a property already exists on the object with the specified name or if the specified value doesn't match one of the enumerated values。
异常
oacInvalidObjForProp。oacInvalidEnumValue。
Python 示例
from oapy._oa import _base
_base.oaEnumProp.create(object, name, value, numEnums, enums)
_base.oaEnumProp.create(object, name, value, enums)
绑定状态: 已绑定
Python 调用: _base.oaEnumProp.create(object, name, value, enums)
This function creates an enumerated property with the specified attributes。 The specified name is checked to verify it is unique for properties on the specified object。 An exception is thrown if a property already exists on the object with the specified name。 An exception is thrown if the value is not one of the strings in the array of allowed values。
异常
oacInvalidEnumValue。oacInvalidObjForProp。oacPropNameUsed。
Python 示例
from oapy._oa import _base
_base.oaEnumProp.create(object, name, value, enums)