# Updating Arrow component relX property

**URL:** <https://forum.inductiveautomation.com/t/updating-arrow-component-relx-property/3455>\
**Category:** Ignition\
**Created:** [October 18, 2011, 7:20pm UTC](https://forum.inductiveautomation.com/t/updating-arrow-component-relx-property/3455 "2011-10-18T19:20:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [October 18, 2011, 7:20pm UTC](https://forum.inductiveautomation.com/t/updating-arrow-component-relx-property/3455/1 "2011-10-18T19:20:15Z")

</div>

Hey guys,

I must be going crazy, I’m trying to get an arrow shape to move across the screen depending on what direction a conveyor is traveling. I have a property change script running on a timer with this code:

`if event.propertyName == "Value":
    forward = int(system.tag.getTagValue("Kill Floor Main PLC/Inverter Tags/Forward Run Inverter 1"))
    reverse = int(system.tag.getTagValue("Kill Floor Main PLC/Inverter Tags/Reverse Run Inverter 1"))
    xDistance = event.source.parent.getComponent('Arrow').relX
    if forward == 1:
        if xDistance < 580.0:
            event.source.parent.getComponent('Arrow').relX = xDistance + 5.0
        else:
            event.source.parent.getComponent('Arrow').relX = 30.0
    if reverse == 1:
        if xDistance > 30.0:
            event.source.parent.getComponent('Arrow').relX = xDistance - 5.0
        else:
            event.source.parent.getComponent('Arrow').relX = 580.0`

but no matter what I do the arrow will not change position. Did I do something stupid that I can’t see ? I’m not sure why it’s not working…

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 18, 2011, 8:54pm UTC](https://forum.inductiveautomation.com/t/updating-arrow-component-relx-property/3455/2 "2011-10-18T20:54:10Z")

</div>

The first line should be:`if event.propertyName == "value":`

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [October 19, 2011, 11:31am UTC](https://forum.inductiveautomation.com/t/updating-arrow-component-relx-property/3455/3 "2011-10-19T11:31:18Z")

</div>

Oh my god… so close! I actually tried that before but apparently it doesn’t work in the designer, I had to publish the project and then it worked in the client. Thanks!

Edit: It does work in the designer in preview mode, I didn’t try that either… 😊
