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 | Control type name e.g.: TcHmi.Controls.Beckhoff.TcHmiButton |
Return value
Type | Description |
---|---|
Base path of the control or null if the type is unknown. |
Available from version 1.12 |
Sample - JavaScript
var fullImagePath = TcHmi.Environment.getControlBasePath('TcHmi.Controls.MyNamespace.MyControl') + '/images/myImg.png';