Adding Template to Recipe logic using script

Hi all,
I'm creating a recipe using scripting functions. I'm trying to add a template that is present in Batch Recipe Editor to recipe logic using addStep() function.
Is there a way to get the Template in such a format that I can pass it as argument to addStep() so that it get's added to the recipe?

Hi user66,

I'd recommend consulting our Recipe Creation Script examples like this one.

Also, feel free to reach out to support@sepasoft.com and we can schedule a call to look at your use case and apply best practices.

Best regards,
Mark

1 Like

Is there scripting functions that can be used to perform the similar operation as dragging and dropping a template from Palette to design space?

I tried doing this using some scripting function and it was working but when I delete the recipe the template is also getting deleted along with it. But when I do the same in recipe editor without using the scripting functions it does not get deleted from the template.

I think this might have something to do with the way I'm setting the ref UUID.
I'm currently using the function system.mes.batch.recipe.loadTemplate(name, parentLink) - MES Platform 3.0 - Sepasoft MES Help Documentation and getUUID() then later setting the same to the added step using setLogicRefUUID().