getControlBasePathEx

[ Function ]

public static getControlBasePath(
    control: TcHmi.Controls.System.baseTcHmiControl
): string | null;

Returns the base path of a control based on an instance of TcHmi.Controls.System.baseTcHmiControl. This is required, for example, if you want to access the directory of a control.

Parameter

Name

Type

Description

control

TcHmi.Controls.System.baseTcHmiControl

Reference to an instance of TcHmi.Controls.System.baseTcHmiControl.

Return value

Type

Description

string | null

Base path of the control or null if the type is unknown.

getControlBasePathEx 1:

Available from version 1.12

Sample - JavaScript

var fullImagePath = TcHmi.Environment.getControlBasePathEx(this) + '/images/myImg.png';