exists

[ Function ]

public static exists(
    expression: string,
    callback?: (data: Symbol.IExistsResultObject) => void
): any;

Checks if the symbol exists.

Parameter

Name

Type

Description

expression

string

Name of the symbol

callback [ optional ]

(data: Symbol.IExistsResultObject) => void

This is triggered when the action has been successfully completed or an error has occurred. For details, please refer to the parameter data.

Return value

Type

Description

void

No return value

exists 1:

Available from version 1.10.1336.10

Sample - JavaScript

TcHmi.Symbol.exists('%s%PLC1.MAIN.sTest%/s%', function (data) {
    if (data.error === TcHmi.Errors.NONE) {
        // Handle result value...
        var symExists = data.result;
        console.log('Symbol exists: '+ symExists);
    } else {
        // Handle error...
    }
});