Attrib Getter
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpAttribGetter |
| Module | cenpylib.CENPyOlpAttribGetter |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 13 |
Quick Start
# Boilerplate Example
attribGetter = ... # obtained from the runtime context
result = attribGetter.GetInteger("...")Method Index
| Method | Returns | Summary |
|---|---|---|
GetInteger | int | Get the Integer Value for the given Integer attribute. |
GetDouble | float | Get the Double Value for the given Double attribute. |
GetString | str | Get the String Value for the given String attribute. |
GetBool | bool | Get the Bool Value for the given Bool attribute. |
GetEnumIndex | int | Get the Index for the given Enum attribute. |
GetAttributeTableByName | CENPyOlpAttributeTable | Get a user-defined Table attribute by the given name. |
GetAttributeByName | CENPyOlpAttribute | Get a user-defined attribute by the given name. |
GetAttributeBoolByName | CENPyOlpAttributeBool | Get the Bool attribute by the given name. |
GetAttributeEnumByName | CENPyOlpAttributeEnum | Get the Enum attribute by the given name. |
GetAttributeDoubleByName | CENPyOlpAttributeDouble | Get the Double attribute by the given name. |
GetAttributeIntegerByName | CENPyOlpAttributeInt | Get the Integer attribute by the given name. |
GetSystemAttribGetter | CENPyOlpSystemAttribGetter | Get the system attrib getter. |
GetScopeSortedTableRows | list | Get all IDs (first column) of the table from both program and controller tables. |
Query Methods
GetInteger
def GetInteger(name: str) -> intGet the Integer Value for the given Integer attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute. |
Returns: int — Value of the Integer Attribute.
GetDouble
def GetDouble(name: str) -> floatGet the Double Value for the given Double attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute. |
Returns: float — Value of the Double Attribute.
GetString
def GetString(name: str) -> strGet the String Value for the given String attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute. |
Returns: str — Value of the String Attribute.
GetBool
def GetBool(name: str) -> boolGet the Bool Value for the given Bool attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute. |
Returns: bool — Value of the Bool Attribute.
GetEnumIndex
def GetEnumIndex(name: str) -> intGet the Index for the given Enum attribute.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute. |
Returns: int — Index of the Enum Attribute.
GetAttributeTableByName
def GetAttributeTableByName(name: str, containsCellId: str='') -> CENPyOlpAttributeTableGet a user-defined Table attribute by the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute to find. |
containsCellId | str | Row ID (empty by default). (default: '') |
Returns: CENPyOlpAttributeTable — Attribute table object.
GetAttributeByName
def GetAttributeByName(name: str) -> CENPyOlpAttributeGet a user-defined attribute by the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute to find. |
Returns: CENPyOlpAttribute — Attribute object.
GetAttributeBoolByName
def GetAttributeBoolByName(name: str) -> CENPyOlpAttributeBoolGet the Bool attribute by the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute to find. |
Returns: CENPyOlpAttributeBool — Bool attribute object.
GetAttributeEnumByName
def GetAttributeEnumByName(name: str) -> CENPyOlpAttributeEnumGet the Enum attribute by the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute to find. |
Returns: CENPyOlpAttributeEnum — Enum attribute object.
GetAttributeDoubleByName
def GetAttributeDoubleByName(name: str) -> CENPyOlpAttributeDoubleGet the Double attribute by the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute to find. |
Returns: CENPyOlpAttributeDouble — Double attribute object.
GetAttributeIntegerByName
def GetAttributeIntegerByName(name: str) -> CENPyOlpAttributeIntGet the Integer attribute by the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
name | str | Name of the attribute to find. |
Returns: CENPyOlpAttributeInt — Integer attribute object.
GetSystemAttribGetter
def GetSystemAttribGetter() -> CENPyOlpSystemAttribGetterGet the system attrib getter.
Returns: CENPyOlpSystemAttribGetter — System attrib getter object.
GetScopeSortedTableRows
def GetScopeSortedTableRows(tableAttribName: str) -> listGet all IDs (first column) of the table from both program and controller tables. Duplicated IDs are removed.
Parameters:
| Name | Type | Description |
|---|---|---|
tableAttribName | str | Name of the desired table. |
Returns: list — List with all IDs.
Related Types
- Attribute Table
- Attribute
- Attribute Bool
- Attribute Enum
- Attribute Double
- Attribute Int
- System Attrib Getter
Version Notes
This class is documented as of release R2025.2.4.