PostInitAttribute
The callback PostInitAttributes (CENPyOlpEvent_AttribInitOperator) is called when the kernel initializes the event attributes.
Es kann verwendet werden, um:
-
Attribute initialisieren
-
Attributwerte abrufen
-
Attributwerte festlegen
-
Zugriff auf OlpController
-
Ausgabe in das Protokoll
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?