oaModModuleScalarInst
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaModModuleScalarInst 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaModModuleScalarInst 当前在 oapy 中可用的 Python 接口。
详细说明
The oaModModuleScalarInst class implements a scalar instance of a module master in a module hierarchy。 The module containing the instance, the instance, and its master are always contained with the same oaDesign 。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getName(name) |
| ✅ | obj.setName(name) |
| ✅ | obj.getName(name) |
| ✅ | obj.getName(ns, name) |
| ✅ | _design.oaModModuleScalarInst.create(module, master, name) |
| ✅ | _design.oaModModuleScalarInst.create(module, master) |
| ✅ | _design.oaModModuleScalarInst.create(module, masterModName, name) |
| ✅ | _design.oaModModuleScalarInst.create(module, masterModName) |
| ✅ | _design.oaModModuleScalarInst.find(module, name) |
| ✅ | _design.oaModModuleScalarInst.isValidName(module, name) |
方法说明
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
This function returns the name of this scalarModuleInst in the name argument。
Python 示例
from oapy._oa import _design
# assume obj is a oaModModuleScalarInst
obj.getName(name)
obj.setName(name)
绑定状态: 已绑定
Python 调用: obj.setName(name)
This function changes the name of this instance to the specified name。 Exceptions are thrown if: the new name does not imply a scalar name an instance already exists with the given name a vectorInstDef exists with the given name。
参数
name: The new name to be set for this instance。
异常
oacInvalidHierInstName。oacInstNameExists。oacInstNameOverlapsOtherInst。
Python 示例
from oapy._oa import _design
# assume obj is a oaModModuleScalarInst
obj.setName(name)
obj.getName(name)
绑定状态: 已绑定
Python 调用: obj.getName(name)
Python 示例
from oapy._oa import _design
# assume obj is a oaModModuleScalarInst
obj.getName(name)
obj.getName(ns, name)
绑定状态: 已绑定
Python 调用: obj.getName(ns, name)
Python 示例
from oapy._oa import _design
# assume obj is a oaModModuleScalarInst
obj.getName(ns, name)
_design.oaModModuleScalarInst.create(module, master, name)
绑定状态: 已绑定
Python 调用: _design.oaModModuleScalarInst.create(module, master, name)
This function creates an oaModModuleScalarInst object with the specified attributes。 This form of the create specifies the name of the master module so that the master module does not need to exist to use it。 The name of the instance is automatically generated。
参数
module: The module in which to create the instance。masterModuleName: The name of the master module。
Python 示例
from oapy._oa import _design
_design.oaModModuleScalarInst.create(module, master, name)
_design.oaModModuleScalarInst.create(module, master)
绑定状态: 已绑定
Python 调用: _design.oaModModuleScalarInst.create(module, master)
This function creates an oaModModuleScalarInst object with the specified attributes。 This form of the create specifies the name of the master module so that the master module does not need to exist to use it。 Exceptions are thrown if: the new name does not imply a scalar name an instance already exists with the given name a vectorInstDef exists with the given name。
参数
module: The module in which to create the instance。masterModuleName: The name of the master module。name: The name of the instance。
异常
oacInvalidHierInstName。oacInstNameExists。oacInstNameOverlapsOtherInst。
Python 示例
from oapy._oa import _design
_design.oaModModuleScalarInst.create(module, master)
_design.oaModModuleScalarInst.create(module, masterModName, name)
绑定状态: 已绑定
Python 调用: _design.oaModModuleScalarInst.create(module, masterModName, name)
This function creates an oaModModuleScalarInst object with the specified attributes。 This form of the create requires an existing master module。 The name of the instance is automatically generated。
参数
module: The parent module in which to create the instance。master: The master for the instance。
异常
oacModulesNotInSameDesign。
Python 示例
from oapy._oa import _design
_design.oaModModuleScalarInst.create(module, masterModName, name)
_design.oaModModuleScalarInst.create(module, masterModName)
绑定状态: 已绑定
Python 调用: _design.oaModModuleScalarInst.create(module, masterModName)
This function creates an oaModModuleScalarInst object with the specified attributes。 This form of the create specifies the master module so that the master module needs to exist to use it。 Exceptions are thrown if: the new name does not imply a scalar name an instance already exists with the given name a vectorInstDef exists with the given name。
参数
module: The module in which to create the instance。master: The master for the instance。name: The instance name。
异常
oacModulesNotInSameDesign。oacInvalidHierInstName。oacInstNameExists。oacInstNameOverlapsOtherInst。
Python 示例
from oapy._oa import _design
_design.oaModModuleScalarInst.create(module, masterModName)
_design.oaModModuleScalarInst.find(module, name)
绑定状态: 已绑定
Python 调用: _design.oaModModuleScalarInst.find(module, name)
This function searches the specified module for a module scalar inst with the specified name。 The function returns the instance if it finds one。 Otherwise, NULL is returned。
参数
module: The module in which to search for the instance。name: The instance name。
返回
- The oaModModuleScalarInst pointer or NULL。
Python 示例
from oapy._oa import _design
_design.oaModModuleScalarInst.find(module, name)
_design.oaModModuleScalarInst.isValidName(module, name)
绑定状态: 已绑定
Python 调用: _design.oaModModuleScalarInst.isValidName(module, name)
This function returns a boolean value that indicates if the specified name is valid for a new oaModModuleScalarInst in the specified module。
参数
module: The module in which to validate the name。name: The instance name to validate。
Python 示例
from oapy._oa import _design
_design.oaModModuleScalarInst.isValidName(module, name)