Skip to Content

Event Object

Quick Facts

PropertyValue
ClassCENPyOlpEventObject
Modulecenpylib.CENPyOlpEventObject
Packagecenpylib
ReleaseR2025.2.4
Methods12

Quick Start

# Boilerplate Example # Acquire the event object from the runtime context eventObject = ... # provided by the framework

Method Index

MethodReturnsSummary
SetEnumIndexSets the index of the active enum literal of the attribute with the given name
GetEnumIndexintGets the index of the active enum literal of the attribute with the given name
SetIntegerSets a new value to the given attribute
GetIntegerintGets the integer attribute value for the given attribute name
SetDoubleSets a new value to the given attribute
GetDoublefloatGets a the value for the given attribute
SetStringSets a new value to the given attribute
GetStringstrGets a the value for the given attribute
SetBoolSets a new value to the given attribute
GetBoolboolGets a the value for the given attribute
GetOlpEventInsertPositionintGet the event’s insert Position before/after.
GetOlpEventNamestrGet the event’s Name.

Query Methods

GetEnumIndex

def GetEnumIndex(name: str) -> int

Gets the index of the active enum literal of the attribute with the given name

Parameters:

NameTypeDescription
namestrname of the enum attribute

Returns: int — literal index

GetInteger

def GetInteger(name: str) -> int

Gets the integer attribute value for the given attribute name

Parameters:

NameTypeDescription
namestrname of the attribute

Returns: int — Attribute value.

GetDouble

def GetDouble(name: str) -> float

Gets a the value for the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute

Returns: float — Attribute value.

GetString

def GetString(name: str) -> str

Gets a the value for the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute

Returns: str — Attribute value.

GetBool

def GetBool(name: str) -> bool

Gets a the value for the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute

Returns: bool — Attribute value.

GetOlpEventInsertPosition

def GetOlpEventInsertPosition() -> int

Get the event’s insert Position before/after.

Returns: int — insert Position before/after

GetOlpEventName

def GetOlpEventName() -> str

Get the event’s Name.

Returns: str — the Name of the OlpEvent

Mutation Methods

SetEnumIndex

def SetEnumIndex(name: str, iVal: int)

Sets the index of the active enum literal of the attribute with the given name

Parameters:

NameTypeDescription
namestrname of the attribute
iValintnew literal index

SetInteger

def SetInteger(name: str, iVal: int)

Sets a new value to the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute
iValintnew value of the attribute

SetDouble

def SetDouble(name: str, iVal: float)

Sets a new value to the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute
iValfloatnew value of the attribute

SetString

def SetString(name: str, iVal: str)

Sets a new value to the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute
iValstrnew value of the attribute

SetBool

def SetBool(name: str, iVal: bool)

Sets a new value to the given attribute

Parameters:

NameTypeDescription
namestrname of the attribute
iValboolnew value of the attribute

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?