首页 / tech / oaLayerArrayConstraint

oaLayerArrayConstraint

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

概览

oaLayerArrayConstraintoapy 中可用,可通过 _tech 模块访问。

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

详细说明

This class represents a constraint object that constrains interactions between more than two layers。 Full description of oaLayerArrayConstraint includes the following: An array of layers ( oaLayerArray ) The constraint definition ( oaLayerArrayConstraintDef ) The constraint name ( oaString )。 When creating an oaLayerArrayConstraint, providing the name is optional。 If the name is not specified, the new constraint is auto-named by OpenAccess。 The constraint value ( oaValue )。 oaLayerArrayConstraint must be created in the same database as that value。 A boolean attribute (oaBoolean) indicating whether the constraint is hard, which means it must be met, or soft。 An optional list of constraint parameters ( oaConstraintParamArray )。 oaLayerArrayConstraints get applied to objects by being placed in an oaConstraintGroup 。

方法总览

状态 Python 调用
obj.getLayers(layerNums)
obj.getPurposes(purposeNums)
_tech.oaLayerArrayConstraint.create(layerNums, def, value, isHard=true, params=NULL)
_tech.oaLayerArrayConstraint.create(layerNums, def, name, value, isHard=true, params=NULL)
_tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, value, isHard=true, params=NULL)
_tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, name, value, isHard=true, params=NULL)
_tech.oaLayerArrayConstraint.find(group, layerNums, def, hardOnly=false)
_tech.oaLayerArrayConstraint.find(group, layerNums, purposeNums, def, hardOnly=false)
_tech.oaLayerArrayConstraint.getConstraints(group, layerNums, def=NULL)

方法说明

obj.getLayers(layerNums)

绑定状态: 已绑定

Python 调用: obj.getLayers(layerNums)

This function returns the layer numbers associated with this layer array constraint。 The function fills the layer array provided by the caller。 All layer numbers that existed in the layer array before the call are removed from the array, so that after the function returns, the layerNums array contains only the layers on which the constraint depends。

参数

  • layerNums: The layer numbers of the constraint。

Python 示例

from oapy._oa import _tech

# assume obj is a oaLayerArrayConstraint
obj.getLayers(layerNums)

obj.getPurposes(purposeNums)

绑定状态: 已绑定

Python 调用: obj.getPurposes(purposeNums)

This function returns the purpose numbers associated with this layer constraint and fills the purposeNums array provided by the caller。 Any purpose numbers that exist in the array before the call are removed。 After the function returns, the purposeNums array contains only the purpose numbers on which the constraint depends。

参数

  • purposeNums: The returned array of purpose numbers for this constraint。

Python 示例

from oapy._oa import _tech

# assume obj is a oaLayerArrayConstraint
obj.getPurposes(purposeNums)

_tech.oaLayerArrayConstraint.create(layerNums, def, value, isHard=true, params=NULL)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.create(layerNums, def, value, isHard=true, params=NULL)

This function creates an explicitly named constraint。 The new layer array constraint is created in the same database as the value specified and with the specified purpose。

参数

  • layerNums: The array of layer numbers that this constraint applies to。
  • purposeNums: The list of purpose numbers for this constraint。
  • def: The definition for this constraint。
  • name: The name of this constraint。
  • value: The constraint value。
  • isHard: A boolean indicating whether this constraint must be met。
  • params: The parameters associated with this constraint。

异常

  • oacValueAlreadyOwned
  • oacInvalidDatabaseForLayerArrayConstraint
  • oacConstraintParamAlreadyOwned
  • oacConstraintParamNotInSameDB
  • oacInvalidValueForConstraintDef
  • oacInvalidDBForConstraintDef
  • oacInvalidLayerArrayForLayerArrayConstraint
  • oacInvalidPurposeArrayForLayerArrayConstraint
  • oacConstraintNameExists
  • oacInvalidBasePurposeNumber

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.create(layerNums, def, value, isHard=true, params=NULL)

_tech.oaLayerArrayConstraint.create(layerNums, def, name, value, isHard=true, params=NULL)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.create(layerNums, def, name, value, isHard=true, params=NULL)

This function creates an auto-named constraint。 The new layer array constraint is created in the same database as the value specified and with the specified purpose。

参数

  • layerNums: The array of layer numbers that this constraint applies to。
  • purposeNums: The list of purpose numbers for this constraint。
  • def: The definition for this constraint。
  • value: The constraint value。
  • isHard: A boolean indicating whether this constraint must be met。
  • params: The parameters associated with this constraint。

异常

  • oacValueAlreadyOwned
  • oacInvalidDatabaseForLayerArrayConstraint
  • oacConstraintParamAlreadyOwned
  • oacConstraintParamNotInSameDB
  • oacInvalidValueForConstraintDef
  • oacInvalidDBForConstraintDef
  • oacInvalidLayerArrayForLayerArrayConstraint
  • oacInvalidPurposeArrayForLayerArrayConstraint
  • oacInvalidBasePurposeNumber

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.create(layerNums, def, name, value, isHard=true, params=NULL)

_tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, value, isHard=true, params=NULL)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, value, isHard=true, params=NULL)

This function creates a new layer array constraint with the specified name in the same database as the specified value。

参数

  • layerNums: The array of layer numbers that this constraint applies to。
  • def: The definition for this constraint。
  • name: The name of this constraint。
  • value: The constraint value。
  • isHard: A boolean indicating whether this constraint must be met。
  • params: The parameters associated with this constraint。

异常

  • oacValueAlreadyOwned
  • oacInvalidDatabaseForLayerArrayConstraint
  • oacConstraintNameExists

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, value, isHard=true, params=NULL)

_tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, name, value, isHard=true, params=NULL)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, name, value, isHard=true, params=NULL)

This function creates a new, auto-named layer array constraint in the same database as the specified value。

参数

  • layerNums: The array of layer numbers that this constraint applies to。
  • def: The definition for this constraint。
  • value: The constraint value。
  • isHard: A boolean indicating whether this constraint must be met。
  • params: The parameters associated with this constraint。

异常

  • oacValueAlreadyOwned
  • oacInvalidDatabaseForLayerArrayConstraint

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.create(layerNums, purposeNums, def, name, value, isHard=true, params=NULL)

_tech.oaLayerArrayConstraint.find(group, layerNums, def, hardOnly=false)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.find(group, layerNums, def, hardOnly=false)

This function returns the first constraint in this group that matches the definition, layers, purposes, and isHard attribute specified。 If no such constraint is found NULL is returned。 oavPurposeNumberAny acts as a wildcard and selects any purpose number。 If the purpose number array includes oavPurposeNumberAny, the returned constraint must have the other purposes explicitly specified in the array plus any other purpose。

参数

  • group: The constraint group in which to locate the constraint。
  • layerNums: The layer numbers to match。
  • purposeNums: The purpose numbers to match。
  • def: The layer definition。
  • hardOnly: A boolean indicating whether the constraint to match is hard or soft。

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.find(group, layerNums, def, hardOnly=false)

_tech.oaLayerArrayConstraint.find(group, layerNums, purposeNums, def, hardOnly=false)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.find(group, layerNums, purposeNums, def, hardOnly=false)

This function returns the first constraint in this group that matches the specified definition, layers and isHard attribute。 If no such constraint is found, NULL is returned。

参数

  • group: The constraint group in which to locate the constraint。
  • layerNums: The layer numbers to match。
  • def: The layer definition。
  • hardOnly: A boolean indicating a hard or soft constraint。

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.find(group, layerNums, purposeNums, def, hardOnly=false)

_tech.oaLayerArrayConstraint.getConstraints(group, layerNums, def=NULL)

绑定状态: 已绑定

Python 调用: _tech.oaLayerArrayConstraint.getConstraints(group, layerNums, def=NULL)

This function returns a collection of layer array constraints, with the specified definition, and based on the specified layers, in the specified group。 If no definition is specified, all layer array constraints on the specified layers in the group are returned。

参数

  • group: The constraint group that the collection belongs to。
  • layerNums: The layer numbers of the constraint to match。
  • def: An optional layer array constraint definition to match。

Python 示例

from oapy._oa import _tech

_tech.oaLayerArrayConstraint.getConstraints(group, layerNums, def=NULL)