Python scripting - Event operators

CENPyOlpEvent_AttribInitOperator

 

The object of the CENPyOlpEvent_AttribInitOperator class is passed to the PostInitAttributes callback as a parameter.

It can be used to obtain the required operators within the scope of the PostInitAttributes callback in the %EVENT_NAME%.py script file.

 

[Example]

File: Samples\JenoptikPluginUpdated\Plugin\TechnologyPackages\LaserCuttingTechnology\Jenoptik\LaserEvent.py

 

def PostInitAttributes(eventAttribInitOperator):

 

 

Methods

 

GetAttribCreator(): CENPyOlpAttribCreator

 

o

return

Object of CENPyOlpAttribCreator class

 

[Example]

   def PostInitAttributes(EventAttribInitOperator):

 

   attribCreator = EventAttribInitOperator.GetAttribCreator()

   

   attribCreator.AddInteger('EIntAttribute', 0, -100, 0, USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EIntAttribute')

   attribCreator.AddDouble('EDoubleAttribute', 55.5, 0, 100, 0.5, USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, ATTRIB_STANDARD, 'EDoubleAttribute')

   attribCreator.AddString('EStringAttribute', 'Hello World', USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EStringAttribute')

   attribCreator.AddBool('EBoolAttribute', True, USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EBoolAttribute') 

   myLiterals = ["earth", "revolves", "around"]

   myLiterals.insert(0,"The")

   myLiterals.append("sun")

   attribCreator.AddEnum('EEnumAttribute', myLiterals, 'earth', USER_ATTRIBUTE | PROCESS_ATTRIBUTE | GLOBAL_ATTRIBUTE, 'EEnumAttribute') 

 


 

GetAttribGetter(): CENPyOlpAttribGetter

 

o

return

Object of CENPyOlpAttribGetter class

 

[Example]

   attribGetter = eventAttribInitOperator.GetAttribGetter()

 


 

GetAttribSetter(): CENPyOlpAttribSetter

 

o

return

Object of CENPyOlpAttribSetter class

 

[Example]

   attribSetter = eventAttribInitOperator.GetAttribSetter()

 


 

GetLoggerOperator(): CENPyOlpLogOperator

 

o

return

Object of CENPyOlpLogOperator class

 

[Example]

   logOperator = eventAttribInitOperator.GetLoggerOperator()

 


 

GetController(): CENPyOlpController

 

o

return

Object of CENPyOlpController class

 

[Example]

   olpController = eventAttribInitOperator.GetController()

 

 


 



Previous
Page précédente
Chapter
Page principale du chapitre
Next
Page suivante