Automatically accept the update message in the client?

Is there a way to automatically accept the update message in the client.
(for example in a client script based on editCount change)
I have Ignition Client for TV with no mouse/keyboard.

You can change the Client Update Mode to Push as shown in the docs.
I don’t know of any way to do it just for an individual client.

https://docs.inductiveautomation.com/display/DOC80/Client+Update+Modes

Something along these lines (untested) should work. You’ll need to run it from some component - maybe a timer component periodically on a docked window or something like that:

from com.inductiveautomation.ignition.client.util.gui import IgnitionSwingUtilities
from com.inductiveautomation.factorypmi.application.runtime import ClientPanel

clientPanel = IgnitionSwingUtilities.getAncestorOfClass(ClientPanel, self)

clientPanel.updateBar.getLabel().doClick()
1 Like

In Ignition 8.0, clientPanel can’t access updateBar

AttributeError: 'com.inductiveautomation.factorypmi.application.run' object has no attribute 'updateBar'

I have tried to use clientPanel.doUpdateProject() according to :
http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.0-beta/index.html
but I have the following error :

AttributeError: 'com.inductiveautomation.factorypmi.application.run' object has no attribute 'doUpdateProject'

Any idea ?

Try importing FieldUtils and reading the (package-private) updateBar field:
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/reflect/FieldUtils.html#readField-java.lang.Object-java.lang.String-