Python scripting - Technology operators

CENPyOlpTech_AttribChangedOperator

 

The object of the CENPyOlpTech_AttribChangedOperator class is passed to the PostTechOnAttribChanged callback as a parameter.

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

 

[Example]

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

 

def PostTechOnAttribChanged(techAttribChangedOperator):

   pass

 

 

Methods

 

GetAttribGetter()

 

o

return

Object of CENPyOlpAttribGetter class

 

This operator gives the possibility to find attribute and get their values.

 

[Example]

   attribGetter = techAttribChangedOperator.GetAttribGetter()

 


 

GetAttribSetter()

 

o

return

Object of CENPyOlpAttribSetter class

 

This operator gives the possibility to change attribute values.

 

[Example]

   attribSetter = techAttribChangedOperator.GetAttribSetter()

 


 

GetLoggerOperator()

 

o

return

Object of CENPyOlpLogOperator class

 

This operator gives the possibility to log issues resulting by user input.

 

[Example]

   logOperator = techAttribChangedOperator.GetLoggerOperator()

 


 

GetController()

 

o

return

Object of CENPyOlpController class

 

This method returns the assigned controller.

 

[Example]

   controller = techAttribChangedOperator.GetController()

 


 

 Method is deprecated, consider using GetChangedAttributeName()

 

GetChangedAttribute()

 

o

return

Object of CENPyOlpAttribute class

 

 This method returns the changed attribute which rises OnAttribChanged callback.

 

[Example]

   changedAttrib = techAttribChangedOperator.GetChangedAttribute()

 


 

GetChangedAttributeName()

 

o

return

name of the changed attribute

 

This method returns the name of changed attribute which rises OnAttribChanged callback.

 

[Example]

def PostOnAttribChanged(Operator):

   logging = Operator.GetLoggerOperator()

   logging.LogInfo(FILE_NAME +" GetChangedAttributeName:"+ Operator.GetChangedAttributeName())

 


 


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