getControlBasePath

[ Function ]

public static getControlBasePath(
    type: string
): string | null;

Returns the base path of a control based on the control type name. This is required, for example, if you want to access the directory of a control.

Parameter

Name

Type

Description

type

string

Control type name

e.g.: TcHmi.Controls.Beckhoff.TcHmiButton

Return value

Type

Description

string | null

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

getControlBasePath 1:

Available from version 1.12

Sample - JavaScript


var fullImagePath = TcHmi.Environment.getControlBasePath('TcHmi.Controls.MyNamespace.MyControl') + '/images/myImg.png';