oaSimpleConstraint
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaSimpleConstraint 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaSimpleConstraint 当前在 oapy 中可用的 Python 接口。
详细说明
The oaSimpleConstraint class represents a basic constraint object that is defined by its oaSimpleConstraintDef 。 A simple constraint has a value associated with it and potentially a list of constraint parameters。 A simple constraint may or may not be a hard constraint。 A hard constraint is a constraint that must be met。 oaSimpleConstraints always have a value, and are created in the same database as that value。 oaSimpleConstraints get applied to objects by being placed in an oaConstraintGroup 。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | _base.oaSimpleConstraint.create(def, value, isHard=true, params=NULL) |
| ✅ | _base.oaSimpleConstraint.create(def, name, value, isHard=true, params=NULL) |
| ✅ | _base.oaSimpleConstraint.find(group, def, hardOnly=false) |
| ✅ | _base.oaSimpleConstraint.getConstraints(group, def) |
方法说明
_base.oaSimpleConstraint.create(def, value, isHard=true, params=NULL)
绑定状态: 已绑定
Python 调用: _base.oaSimpleConstraint.create(def, value, isHard=true, params=NULL)
This function creates an explicitly name constraint with the specified attributes。 The constraint is created in the same database as the value。 The constraint parameters must also exist in the same database as the value。
参数
def: Simple Constraint definition。name: Constraint name。value: Constraint value。isHard: Boolean indicating whether constraint must be met。params: Optional constraint parameters。
异常
oacValueAlreadyOwned。oacConstraintParamAlreadyOwned。
Python 示例
from oapy._oa import _base
_base.oaSimpleConstraint.create(def, value, isHard=true, params=NULL)
_base.oaSimpleConstraint.create(def, name, value, isHard=true, params=NULL)
绑定状态: 已绑定
Python 调用: _base.oaSimpleConstraint.create(def, name, value, isHard=true, params=NULL)
This function creates an auto-named constraint with the specified attributes。 The constraint is created in the same database as the value。 The constraint parameters must also exist in the same database as the value。
参数
def: Simple Constraint definition。value: Constraint value。isHard: Boolean indicating whether constraint must be met。params: Optional constraint parameters。
异常
oacValueAlreadyOwned。oacConstraintParamAlreadyOwned。
Python 示例
from oapy._oa import _base
_base.oaSimpleConstraint.create(def, name, value, isHard=true, params=NULL)
_base.oaSimpleConstraint.find(group, def, hardOnly=false)
绑定状态: 已绑定
Python 调用: _base.oaSimpleConstraint.find(group, def, hardOnly=false)
This function returns the first hard or soft constraint in the group with the definition specified。
参数
group: Constraint group to search。def: Simple Constraint definition to search for。hard: Boolean indicating whether or not the constraint to be searched for is hard or soft。
Python 示例
from oapy._oa import _base
_base.oaSimpleConstraint.find(group, def, hardOnly=false)
_base.oaSimpleConstraint.getConstraints(group, def)
绑定状态: 已绑定
Python 调用: _base.oaSimpleConstraint.getConstraints(group, def)
This function returns a collection of simple constraints in the specified group whose definition matches the one given。 If no definition is specified, all simple constraints in that group are returned。
参数
group: The group to search in。def: The simple constraint definition to filter for。
Python 示例
from oapy._oa import _base
_base.oaSimpleConstraint.getConstraints(group, def)