TeachAsNewRecipe
function TeachAsNewRecipe(ctx: TcHmi.SelectableRequired<TcHmi.Context, 'success' | 'error'>, recipeReference: string, newRecipeName: string, newRecipePath: string)
The TeachAsNew function reads the current values of the symbols of a defined recipe from the target and stores them in a new recipe.
Parameter
Name |
Type |
Description |
---|---|---|
ctx Available from version 1.10 | 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 | The reference of the recipe (path plus name) whose current symbol values are to be read from the target. Examples: 'MyRecipe1' 'MyFolder::MyRecipe2' | |
newRecipeName | The name of the new recipe that is to be created and in which the values are to be stored. If required, this name can already contain the folder structure in which the recipe is to be stored. Otherwise the folder structure can be specified under newRecipePath. | |
newRecipePath | The path under which the new recipe is to be stored. If this parameter is empty, the recipe is created at the highest folder level. Example: 'MyFolder' 'MyFolder1::MyFolder2' |
Return value
Type | Description |
---|---|
void | No return value. |
NuGet package: Beckhoff.TwinCAT.HMI.Functions
NuGet packages are available from version 1.12. |
Available from version 1.10.1171.142 |