Adding OnUpdate code

Adding python code for OnUpdate event of HDA.