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.
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)
|