Skip to Content

Attrib Getter

Quick Facts

PropertyValue
ClassCENPyOlpAttribGetter
Modulecenpylib.CENPyOlpAttribGetter
Packagecenpylib
ReleaseR2025.2.4
Methods13

Quick Start

# Boilerplate Example attribGetter = ... # obtained from the runtime context result = attribGetter.GetInteger("...")

Method Index

MethodReturnsSummary
GetIntegerintGet the Integer Value for the given Integer attribute.
GetDoublefloatGet the Double Value for the given Double attribute.
GetStringstrGet the String Value for the given String attribute.
GetBoolboolGet the Bool Value for the given Bool attribute.
GetEnumIndexintGet the Index for the given Enum attribute.
GetAttributeTableByNameCENPyOlpAttributeTableGet a user-defined Table attribute by the given name.
GetAttributeByNameCENPyOlpAttributeGet a user-defined attribute by the given name.
GetAttributeBoolByNameCENPyOlpAttributeBoolGet the Bool attribute by the given name.
GetAttributeEnumByNameCENPyOlpAttributeEnumGet the Enum attribute by the given name.
GetAttributeDoubleByNameCENPyOlpAttributeDoubleGet the Double attribute by the given name.
GetAttributeIntegerByNameCENPyOlpAttributeIntGet the Integer attribute by the given name.
GetSystemAttribGetterCENPyOlpSystemAttribGetterGet the system attrib getter.
GetScopeSortedTableRowslistGet all IDs (first column) of the table from both program and controller tables.

Query Methods

GetInteger

def GetInteger(name: str) -> int

Get the Integer Value for the given Integer attribute.

Parameters:

NameTypeDescription
namestrName of the attribute.

Returns: int — Value of the Integer Attribute.

GetDouble

def GetDouble(name: str) -> float

Get the Double Value for the given Double attribute.

Parameters:

NameTypeDescription
namestrName of the attribute.

Returns: float — Value of the Double Attribute.

GetString

def GetString(name: str) -> str

Get the String Value for the given String attribute.

Parameters:

NameTypeDescription
namestrName of the attribute.

Returns: str — Value of the String Attribute.

GetBool

def GetBool(name: str) -> bool

Get the Bool Value for the given Bool attribute.

Parameters:

NameTypeDescription
namestrName of the attribute.

Returns: bool — Value of the Bool Attribute.

GetEnumIndex

def GetEnumIndex(name: str) -> int

Get the Index for the given Enum attribute.

Parameters:

NameTypeDescription
namestrName of the attribute.

Returns: int — Index of the Enum Attribute.

GetAttributeTableByName

def GetAttributeTableByName(name: str, containsCellId: str='') -> CENPyOlpAttributeTable

Get a user-defined Table attribute by the given name.

Parameters:

NameTypeDescription
namestrName of the attribute to find.
containsCellIdstrRow ID (empty by default). (default: '')

Returns: CENPyOlpAttributeTable — Attribute table object.

GetAttributeByName

def GetAttributeByName(name: str) -> CENPyOlpAttribute

Get a user-defined attribute by the given name.

Parameters:

NameTypeDescription
namestrName of the attribute to find.

Returns: CENPyOlpAttribute — Attribute object.

GetAttributeBoolByName

def GetAttributeBoolByName(name: str) -> CENPyOlpAttributeBool

Get the Bool attribute by the given name.

Parameters:

NameTypeDescription
namestrName of the attribute to find.

Returns: CENPyOlpAttributeBool — Bool attribute object.

GetAttributeEnumByName

def GetAttributeEnumByName(name: str) -> CENPyOlpAttributeEnum

Get the Enum attribute by the given name.

Parameters:

NameTypeDescription
namestrName of the attribute to find.

Returns: CENPyOlpAttributeEnum — Enum attribute object.

GetAttributeDoubleByName

def GetAttributeDoubleByName(name: str) -> CENPyOlpAttributeDouble

Get the Double attribute by the given name.

Parameters:

NameTypeDescription
namestrName of the attribute to find.

Returns: CENPyOlpAttributeDouble — Double attribute object.

GetAttributeIntegerByName

def GetAttributeIntegerByName(name: str) -> CENPyOlpAttributeInt

Get the Integer attribute by the given name.

Parameters:

NameTypeDescription
namestrName of the attribute to find.

Returns: CENPyOlpAttributeInt — Integer attribute object.

GetSystemAttribGetter

def GetSystemAttribGetter() -> CENPyOlpSystemAttribGetter

Get the system attrib getter.

Returns: CENPyOlpSystemAttribGetter — System attrib getter object.

GetScopeSortedTableRows

def GetScopeSortedTableRows(tableAttribName: str) -> list

Get all IDs (first column) of the table from both program and controller tables. Duplicated IDs are removed.

Parameters:

NameTypeDescription
tableAttribNamestrName of the desired table.

Returns: list — List with all IDs.

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?