Python scripting - Series callbacks

PostSeriesOnAttribChanged

 

The callback PostSeriesOnAttribChanged(CENPyOlpSeries_AttribChangedOperator) is called  from the kernel when a controller series attribute has been changed.

 

It can be used to:

- access changed attribute

- get attribute values

- set attribute values

- output to the log

 

The callback is defined in the %SeriesName%.py file that is located in the scripts folder of the plugin.

 

PostSeriesOnAttribChanged

 

def PostSeriesOnAttribChanged(seriesAttribChangedOperator):

   changedAttribute = seriesAttribChangedOperator.GetChangedAttribute()

   changedAttributeName = changedAttribute.GetName()

   if changedAttributeName == testDouble:

       attribGetter = seriesAttribChangedOperator.GetAttribGetter()

       attribSetter = seriesAttribChangedOperator.GetAttribSetter()

       testDoubleValue = attribGetter.GetDouble(testDouble)

       testDoubleValueRound = round(testDoubleValue)

       attribSetter.SetInteger(testInt, testDoubleValueRound)

 


PostSeriesOnAttribChanged_Ex

 


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