Call UDT script and execute at runtime
- Last UpdatedJul 10, 2026
- 2 minute read
You can call the UDT scripts that you have created from an Industrial Graphic Script so that in runtime the script is executed and the values are displayed accordingly.
-
In Industrial Graphic Editor, select the object from which you want to execute the UDT script.
-
Double-click the object or right-click and select Edit Animations to open the Edit Animations window.
-
Select the plus icon and then select Action Scripts.
-
In the Trigger type field select the required type of the trigger.
-
In the scripting section type the script to call the UDT script. Use the syntax <UDTInstance>.<ScriptName>.<MethodName>();
If the script contains only one method with the same name as the script, the syntax will be <UDTInstance>.<methodname>();
You can start typing the instance name, and IntelliSense will display the available instance and attribute names.
-
Once you finish typing your script, select OK.
You have to include the InTouch: prefix for Managed InTouch applications and for Standalone InTouch applications using InTouch: prefix is not mandatory.
Execute the script
After completing the UDT script and configuring the Industrial Graphic script that invokes it, click Runtime in WindowMaker to open WindowViewer. Then select the graphic object from which you execute the UDT script.
Examples
The following examples demonstrate calling the UpdateSetpoint script.

-
For Managed InTouch application InTouch:Furnace_1.UpdateSetpoint(Value);
-
For standalone InTouch application Furnace_1.UpdateSetpoint(Value);
Here, Furnace_1 is the instance name, and UpdateSetpoint is the script name. If the script does not contain methods, the script name itself is considered as the method name, so specifying a method name is not mandatory.
You can also use "ExecuteHostedScriptAsync(<instance name>." or type "me."). IntelliSense lists the attribute names that are currently available.
Example:
ExecuteHostedScriptAsync("Furnace_1.UpdateSetpoint","",Value);