Is there a way to have a timer script constantly update the z-order of a specific object? I want to add a condition for one object to be hidden behind another until the condition is true. I was wanting to add 1 to the z-order of said object during this condition. I looked up that this is possible using the z-index function in java, but I’m not sure how to do it in Python within Ignition
Well you could try calling the setComponentZOrder(Component comp, int index) method on a container to set the z-order index on a component in the container.
I got the z-order to change thanks to your suggestion. The issue now is that when I launch the project, the z order only updates when you change the tag in designer and then save (then updating the project in the full screen). I have a timer script running on property change so I don’t think it’s a scan issue with the tag.
also : is there a way to view the z index number of an object within designer?
Sorry, referring to my original post. I have an expression that when said tag value is below 4 to change the z index to 8. else it will change it to 9. When I manually modify this tag in the OPC tag browser, the running project does not update the z-order on the live graphics until the original project is saved within designer.
I have a timer on the screen set to 100ms scan cycle.
On property change, this timer sets a custom property (int) on my object equal to the current count of the timer, cascading the property change to the object itself.
I have an on-property change script on the object :