Skip to Content
Python APIRappelsIOlpSeriesPostSérieOnAttribChanged

PostSérieOnAttribChanged

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

Il peut être utilisé pour :

  • Attribut modifié d’accès

  • obtenir des valeurs d’attribut

  • Définir les valeurs des attributs

  • sortie au journal

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)
Was this page helpful?