The callback PostSeriesInitEvents(CENPyOlpSeries_EventInitOperator) is called just after the kernel initializes the controller series specific events.
It can be used to:
- initialize controller series specific events
- output to the log
The callback is defined in the %SeriesName%.py file that is located in the scripts folder of the plugin.
def PostSeriesInitEvents(seriesEventInitOperator):
seriesEventInitOperator.RegisterPyTechnologyEvent('GasEvent.py') # Register event from the file 'GasEvent.py' (Listed below)
seriesEventInitOperator.RegisterPyTechnologyEvent('GetSensorEvent.py')
seriesEventInitOperator.RegisterPyTechnologyEvent('LaserEvent.py')
seriesEventInitOperator.RegisterPyTechnologyEvent('SetActorEvent.py')
seriesEventInitOperator.RegisterPyTechnologyEvent('ZAxisEvent.py')
seriesEventInitOperator.RegisterPyTechnologyEvent('ChangeRecipeEvent.py')
[Example]
from centypes import *
GAS_TYPE = "GasType"
GAS_TYPE_LIST = ["Off", "StandBy", "OnPierce", "OnContour"]
GAS_OFFSET = "GasOffset"
def GetEventName():
return "GasEvent"
def GetEventUuId():
return "0B446ABF-6F16-4C28-A145-17B085959D09"
def GetIconName():
return "GasEvent"
def GetExplodeCycle():
return 0
def GetMultipleCreationIsPossible():
return 1
def PostInitAttributes(eo):
attribCreator = eo.GetAttribCreator()
# Gas type
attribCreator.AddEnum(GAS_TYPE, GAS_TYPE_LIST, GAS_TYPE_LIST[0], USER_ATTRIBUTE | PROCESS_ATTRIBUTE, GAS_TYPE)
# Gas offset
attribCreator.AddDouble(GAS_OFFSET, 0.99,0.0,1000.0, 1.0, USER_ATTRIBUTE | PROCESS_ATTRIBUTE, ATTRIB_LENGTH, GAS_OFFSET)
def PostProcessAttributes(CENPyOlpEvent_PEOperator):
pass
|