Just a quick note: you should refrain from using shmi.ctrl and only use shmi.onReady as WebIQ is an asynchronous system which means that when your LocalScript runs the dialog might not have been initialized yet so your script would fail. However, it could work perfectly on your system, but on another system or when there is a slow network connection it could fail. That's why you should never rely on "it works on my machine with shmi.ctrl". Therefore you should always and only use shmi.onReady as shown in this example: https://demo.smart-hmi.com/demo-animation/js/custom-libs/local-scripts/shapeRotationExample.js Also, you should not use "dialog = " and "im =", because this would create global JavaScript variables which is usually not intended. You should also prefix those with a "const ".
... View more