getMap

[ Function ]

export function getMap(): Map<string, TcHmi.Controls.System.baseTcHmiControl>;

Returns a ES5 Map with all controls. The key is the respective identifier of the controls.

Parameter

Name

Type

Description

 

 

 

Return value

Type

Description

Map<string, TcHmi.Controls.System.baseTcHmiControl>

An object that contains all controls.

getMap 1:

Available from version 1.12

Sample

let allControls = TcHmi.Controls.getMap();
let someControl = allControls.get('TcHmiButton');
if (someControl && someControl instanceof TcHmi.Controls.Beckhoff.TcHmiButton) {
    someControl.setText('Wow, we have ' + allControls.size + ' controls!');
}