Skip to Content
FASTSUITE E2API ReferencePython APICallbacksIOlpEventPostInitAttributes

PostInitAttributes

The callback

PostInitAttributes

(

CENPyOlpEvent_AttribInitOperator

) is called when the kernel initializes the event attributes.

It can be used to:

  • initialize attributes

  • get attribute values

  • set attribute values

  • access OlpController

  • output to the log

The callback is defined in the

%EVENT_NAME%.py

file that is located in the scripts folder of the

plugin

.

def PostInitAttributes(EventAttribInitOperator): attribCreator = EventAttribInitOperator.GetAttribCreator() # Laser type attribCreator.AddEnum(LASER_TYPE, LASER_TYPE_LIST, LASER_TYPE_LIST[0], USER_ATTRIBUTE | PROCESS_ATTRIBUTE, LASER_TYPE) # Laser offset attribCreator.AddDouble(LASER_OFFSET, 0.0,0.0,1000.0,1.0, USER_ATTRIBUTE | PROCESS_ATTRIBUTE, ATTRIB_LENGTH, LASER_OFFSET)
Was this page helpful?