ActivateRecipe

function ActivateRecipe(ctx: TcHmi.SelectableRequired<TcHmi.Context, 'success' | 'error'>, recipeReference: string): void

The ActivateRecipe function activates the recipe defined in the parameter when the function is executed.

Parameter

Name

Type

Description

ctx

Available from version 1.10

TcHmi.SelectableRequired<TcHmi.Context>

Context object

Does not need to be specified by the user when used in a trigger or function expression. In this case the transfer and the evaluation is done by the corresponding parser.

Is used by the caller to indicate success or failure to the framework during execution.

If the function is used directly in JavaScript/TypeScript, the context object must be passed in the call and evaluated if necessary.

recipeReference

String

The reference or the recipe (path plus name) that is to be activated.

Return value

Type

Description

void

No return value.

NuGet package: Beckhoff.TwinCAT.HMI.Functions

ActivateRecipe 1:

NuGet packages are available from version 1.12.

ActivateRecipe 2:

Available from version 1.10.1171.142