Python scripting - Workmethod operators

CENPyOlpWM_AttribChangedOperator

 

The object of the CENPyOlpWM_AttribChangedOperator class is passed to the PostWmOnAttribChanged callback as a parameter.

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

 

[Example]

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

 

def PostWmOnAttribChanged(wmAttribChangedOperator):

   pass

 

 

Methods

 

GetAttribGetter()

 

o

return

Object of CENPyOlpAttribGetter class

 

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

 

[Example]

   attribGetter = wmAttribChangedOperator.GetAttribGetter()

 


 

GetAttribSetter()

 

o

return

Object of CENPyOlpAttribSetter class

 

This operator gives the possibility to change attribute values.

 

[Example]

   attribSetter = wmAttribChangedOperator.GetAttribSetter()

 


 

GetLoggerOperator()

 

o

return

Object of CENPyOlpLogOperator class

 

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

 

[Example]

   logOperator = wmAttribChangedOperator.GetLoggerOperator()

 


 

GetCsvParserOperator()

 

o

return

Object of CENPyOlpCsvParserOperator class

 

This operator gives the possibility to open a csv file and read the data.

 

[Example]

   csvOperator = wmAttribChangedOperator.GetCsvParserOperator()

 


 

GetWorldReference()

 

o

return

Object of CENPyOlpMatrix class

 

This method returns the world matrix of the attribute reference object.

If the attribute does not have a reference object, the returned matrix will be unit.

 

[Example]

   worldMatrix = wmAttribChangedOperator.GetWorldReference()

 


 

GetController()

 

o

return

Object of CENPyOlpController class

 

This method returns the assigned controller.

 

[Example]

   controller = wmAttribChangedOperator.GetController()

 


 

 Method is deprecated, consider using GetChangedAttributeName()

 

GetChangedAttribute()

 

o

return

Object of CENPyOlpAttribute class

 

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

 

[Example]

   changedAttrib = wmAttribChangedOperator.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