Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

ExecuteCustomCall

  • Last UpdatedOct 29, 2026
  • 3 minute read

ExecuteCustomCall is a built-in function that executes custom code in the ActiveX container that contains the ISSymbol control. For example, you can use this function to execute custom JavaScript on Web Thin Clients.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

ExecuteCustomCall

Graphic

Asynchronous

No

Not supported

Not supported

Not supported

Supported

Not supported

Syntax

ExecuteCustomCall(optParam1,optParam2,…,optParamN)

ExecuteCustomCall ( { | optParam1 { | ,optParam2 { | ,optParamN } } } )

optParam1

optParam2

optParamN

Parameters to be passed through the ISSymbol control to the ActiveX container. See Notes below.

Return value

This function returns one of the following possible values:

Value

Description

-1

Function is not supported.

This error will be returned if the function was called by any of the Background Task worksheets (for example, Math, Script, Scheduler) on the project server. The function only works on Web Thin Clients, and it only affects the Web Thin Client on which it was called.

0

Function executed successfully.

Notes

This function can be used to invoke custom code in any ActiveX container that can add custom events to a control and receive VBArray objects. The following example only shows how this is done when the ActiveX container is Internet Explorer and the ISSymbol control is being used to drive a Web Thin Client.

When you save a project screen as HTML, the resulting webpage by default is simply a frame for the ISSymbol control. The control is embedded in the webpage as an object, similar to a Flash player or a Java applet, and then it is configured to access your project over the network.

There is nothing, however, that prevents you from customizing the webpage, as long as the object configuration is maintained. And as part of customizing the webpage, you might insert the following piece of JavaScript code:

<script language="JavaScript"><!--

ISSymbol1.attachEvent("OnCustomCall",

function(parameters) {

var params = (new VBArray(parameters)).toArray();

…

}

);

//--></script>

This code uses the attachEvent method to add the OnCustomCall event to the ISSymbol control, and then it binds a function to that event. The first line of the function sets up an array that will receive the parameters passed to the function from ExecuteCustomCall. (The parameters are passed as a VBArray object, from your project through the ISSymbol control to the JavaScript function, and the first line of the function converts that VBArray object to a standard JavaScript array.) The rest of the function can be whatever you want it to be.

Once this code is inserted in the webpage, calling ExecuteCustomCall in your project will cause the ISSymbol control to fire the event and execute the function in the web browser.

Note: The attachEvent method was supported only in Internet Explorer 5 through Internet Explorer 10. It has been deprecated in Internet Explorer 11. Instead of the attachEvent method, you can use the DOM-standard methods createEvent, initEvent, and addEventListener to do the same thing. For more information, go to: msdn.microsoft.com/library/ms536343.aspx

If the Enforce Web functionality equivalence in local project screens option is selected in the project settings, this function cannot be called in VBScript Global Procedures, VBScript scripts (script groups), or other background tasks. This is because the function behaves differently depending on whether you view project screens locally (that is, on the same computer that hosts the project runtime) or remotely. For more information, see Preferences tab.

In This Topic
Related Links