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 %SeriesName%.py file.

 

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