oaTextOverride
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaTextOverride 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaTextOverride 当前在 oapy 中可用的 Python 接口。
详细说明
The oaTextOverride class is a shape associated with an oaInst object and an oaText object in the master design of that instance。 The oaTextOverride class supports changing the text attributes that are used to display the oaText object in the master design of that instance。 The oaTextOverride display object resides in the same design as the oaInst object it is associated with。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getMasterText() |
| ✅ | obj.getMasterTextText(text) |
| ✅ | obj.getInst() |
| ✅ | obj.isBound() |
| ✅ | _design.oaTextOverride.create(masterText, inst, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true) |
方法说明
obj.getMasterText()
绑定状态: 已绑定
Python 调用: obj.getMasterText()
This function returns the text object contained in the instance master associated with this textOverride object。 This function returns NULL if the associated instance is not bound。
Python 示例
from oapy._oa import _design
# assume obj is a oaTextOverride
obj.getMasterText()
obj.getMasterTextText(text)
绑定状态: 已绑定
Python 调用: obj.getMasterTextText(text)
This function returns the master text associated with this textOverride object。 This text is used when attempting to bind to the masterText object。
Python 示例
from oapy._oa import _design
# assume obj is a oaTextOverride
obj.getMasterTextText(text)
obj.getInst()
绑定状态: 已绑定
Python 调用: obj.getInst()
This function returns the instance associated with this textOverride object。
Python 示例
from oapy._oa import _design
# assume obj is a oaTextOverride
obj.getInst()
obj.isBound()
绑定状态: 已绑定
Python 调用: obj.isBound()
This function returns a boolean, which indicates whether this text display is currently bound to the cross design master text object。
Python 示例
from oapy._oa import _design
# assume obj is a oaTextOverride
obj.isBound()
_design.oaTextOverride.create(masterText, inst, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)
绑定状态: 已绑定
Python 调用: _design.oaTextOverride.create(masterText, inst, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)
This function creates a textOverride object for the specified text object in the specified instance master。 Note: You must open the instance master for this function to succeed。 The oaText must be contained in the master of the instance。
参数
masterText: The pointer to the oaText object in instance master。inst: The pointer to the instance。layerNum: The number of the layer for this textOverride。purposeNum: The number of the purpose for this textOverride。origin: The origin point for this textOverride shape。alignment: The alignments for this textDisplay shape。orient: The orientation for this textDisplay shape。font: The font used in the display for this textDisplay。height: The height for this textDisplay shape。format: The name or value format for this display shape; the default is oacNameTextDisplayFormat。overbar: Indicates if the display has an overbar; the default is false。visible: Indicates if this textOverride is actually displayed; the default is true。drafting: Indicates the drafting of this textOverride shape; the default is true。
异常
oacNoMasterForTextDisplay。oacTextNotInInstanceMaster。
Python 示例
from oapy._oa import _design
_design.oaTextOverride.create(masterText, inst, layerNum, purposeNum, origin, alignment, orient, font, height, format=oacNameTextDisplayFormat, overbar=false, visible=true, drafting=true)