首页 / base / oaConstraintParamDef

oaConstraintParamDef

模块: oapy._oa._base 导入: from oapy._oa import _base

概览

oaConstraintParamDefoapy 中可用,可通过 _base 模块访问。

本页汇总 oaConstraintParamDef 当前在 oapy 中可用的 Python 接口。

详细说明

The oaConstraintParamDef object specifies a definition for a particular constraint parameter。 The definition contains a name and the valueType that is allowed for the parameter。 The names for constraint parameter definitions must be unique。 The oaConstraintParamDef class can be observed by deriving from oaObserver 。 See Uniqueness of Session Objects for information about the requirement that session objects be unique。

方法总览

状态 Python 调用
obj.getName(name)
obj.getValueType()
obj.isBuiltIn()
obj.destroy()
obj.remove(database)
_base.oaConstraintParamDef.create(name, valueType)
_base.oaConstraintParamDef.find(name)
_base.oaConstraintParamDef.get(type)

方法说明

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function returns the name of the constraintParamDef。

参数

  • name: The returned name。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintParamDef
obj.getName(name)

obj.getValueType()

绑定状态: 已绑定

Python 调用: obj.getValueType()

This function returns the value type of this constraintParamDef。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintParamDef
obj.getValueType()

obj.isBuiltIn()

绑定状态: 已绑定

Python 调用: obj.isBuiltIn()

This function returns true if this constraint param def is a built-in def。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintParamDef
obj.isBuiltIn()

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

This function destroys this constraintParamDef。 If this is a built in type or any databases currently reference this def, an exception is thrown。 An exception is also thrown if this function is called when undo is enabled on any of the current in-memory design or tech databases。

异常

  • oacUnableToDestroyBuiltInType
  • oacConstraintParamDefHasReference
  • oacCannotDestroyDefUndo

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintParamDef
obj.destroy()

obj.remove(database)

绑定状态: 已绑定

Python 调用: obj.remove(database)

This function removes the constraintParamDef from the database specified。 If any constraints in that database currently reference this def an error is thrown。

参数

  • database: Database to remove the definition from。

异常

  • oacConstraintParamDefHasReference

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintParamDef
obj.remove(database)

_base.oaConstraintParamDef.create(name, valueType)

绑定状态: 已绑定

Python 调用: _base.oaConstraintParamDef.create(name, valueType)

This function creates a new oaConstraintParamDef。 It is an error if the name of the constraintParamDef already exists。 It is an error if the type specified is not an oaValueType。

参数

  • name: The oaString name of the parameter。
  • valueType: The value type for the parameter。

异常

  • oacConstraintParamDefExists
  • oacInvalidValueType

Python 示例

from oapy._oa import _base

_base.oaConstraintParamDef.create(name, valueType)

_base.oaConstraintParamDef.find(name)

绑定状态: 已绑定

Python 调用: _base.oaConstraintParamDef.find(name)

This function finds the constraint parameter by name。 If the parameter is not found NULL is returned。

参数

  • name: The parameter name to search for。

Python 示例

from oapy._oa import _base

_base.oaConstraintParamDef.find(name)

_base.oaConstraintParamDef.get(type)

绑定状态: 已绑定

Python 调用: _base.oaConstraintParamDef.get(type)

This function returns the constraintParamDef for the built in type specified。

参数

  • type: The built-in type to search for。

Python 示例

from oapy._oa import _base

_base.oaConstraintParamDef.get(type)