首页 / design / oaInstAttrDisplay

oaInstAttrDisplay

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

概览

oaInstAttrDisplayoapy 中可用,可通过 _design 模块访问。

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

详细说明

The oaInstAttrDisplay is a shape similar to an oaText object, except that it presents a string that is the value of the specified attribute of the master of the oaInst to which it is attached。 Whenever the value of the master's attribute changes, calling the getText function on this oaInstAttrDisplay object returns the updated text string that represents the new value of the master's attribute。 The oaAttrDisplay is contained in the design that contains the attached oaInst object。

方法总览

状态 Python 调用
obj.getText(ns, text)
obj.getInst()
obj.getMasterAttribute()
obj.isBound()
_design.oaInstAttrDisplay.create(inst, masterAttribute, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)

方法说明

obj.getText(ns, text)

绑定状态: 已绑定

Python 调用: obj.getText(ns, text)

This function returns the value of this attribute display according to the specified nameSpace。 The nameSpace is valid only for name type attributes。

Python 示例

from oapy._oa import _design

# assume obj is a oaInstAttrDisplay
obj.getText(ns, text)

obj.getInst()

绑定状态: 已绑定

Python 调用: obj.getInst()

This function returns the instance associated with this instAttrDisplay object。

Python 示例

from oapy._oa import _design

# assume obj is a oaInstAttrDisplay
obj.getInst()

obj.getMasterAttribute()

绑定状态: 已绑定

Python 调用: obj.getMasterAttribute()

This function returns the attribute referenced by this attrDisplay object。

Python 示例

from oapy._oa import _design

# assume obj is a oaInstAttrDisplay
obj.getMasterAttribute()

obj.isBound()

绑定状态: 已绑定

Python 调用: obj.isBound()

This function returns a boolean that indicates if this attribute display is currently bound。

Python 示例

from oapy._oa import _design

# assume obj is a oaInstAttrDisplay
obj.isBound()

_design.oaInstAttrDisplay.create(inst, masterAttribute, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)

绑定状态: 已绑定

Python 调用: _design.oaInstAttrDisplay.create(inst, masterAttribute, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)

This function creates an instAttrDisplay object for the specified attribute that is on the specified instance's master。

参数

  • inst: The oaInst object with which this textDisplay is associated。
  • masterAttribute: The attribute associated with this attrDisplay object。
  • layerNum: The layer number for this textDisplay。
  • purposeNum: The purpose number for this textDisplay。
  • origin: The origin point of this textDisplay shape。
  • alignment: The alignment related to the origin。
  • orient: The orientation of this textDisplay shape。
  • font: The font used to display textDisplay shape。
  • height: The height of this textDisplay。
  • format: The format used to create the textDisplay。
  • overbar: Specifies if this textDisplay has an overbar; the default is false。
  • visible: Specifies if this textDisplay is actually displayed; the default is true。
  • drafting: Specifies the drafting of this textDisplay shape; the default is true。

异常

  • oacInvalidTextDisplayCopy
  • oacPropNotOnInstanceMaster

Python 示例

from oapy._oa import _design

_design.oaInstAttrDisplay.create(inst, masterAttribute, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)