Double Fire on Property Change Event When Publishing to Project

I have a property change event on a component, and it works perfect except that it fires whenever I update the project and the oldValue is still 0. Any ideas on how to mitigate this?

if event.propertyName == 'value':
    if event.oldValue == 0:
        Do something

Is there a binding on this property? If so, you can’t stop it. All binding evaluate at least once. Also, property change events are actually property “assignment” events. Assigning the same value to a property will fire these events, in most cases.

1 Like

Yes, the value has a tag binding. I thought that might be why it was firing. I will have to check another component value or custom property value in tandem with the event.oldValue to allow the script to execute.