system.recipe.importRecipe

Sepasoft MES Module Suite

system.recipe.importRecipe(csvData, note)

Set the recipe values to the current tag value(s) for the production item specified by the itemPath parameter. 

Information

Values that are outside of the range defined in the recipe values security are not imported. When this happens, an exception is returned listing all of the values that were not imported.

See Recipe Security for more information.

Syntax

system.recipe.importRecipe(csvData, note)

Parameters

String csvData - String in CSV format containing recipe values. Must be the same format that is returned by the exportRecipe function.

String  note - Note to be stored in the recipe change log. If no log entry is desired, provide an empty string as a placeholder.

Returns

Nothing

Scope

All

Code Example

Python
csv = system.file.readFileAsString("C:\\Temp\
ecipe_export.csv")
system.recipe.importRecipe(csv, "Values set during import.")

Output

XML
recipe_export.csv:
Recipe_Name,Value_Name,Item_Path,Description,Units,Data_Type,Format,Recipe_Value,Assigned_By
"Stubborn Soda","IBC Vanilla Percentage","Enterprise\New Site\Packaging\packagingLine1\Filler","","","Float8","#,##0.##","3.0","Stubborn Soda"
"Stubborn Soda","Max Temperature","Enterprise\New Site\Packaging\packagingLine1\Filler","","deg","Int4","#,##0.##","98","Stubborn Soda"
"Stubborn Soda","Min Temperature","Enterprise\New Site\Packaging\packagingLine1\Filler","","deg","Float8","#,##0.##","89.0","Stubborn Soda"
"Stubborn Soda","IBC Sugar Percentage","Enterprise\New Site\Packaging\packagingLine1\Filler","","","Float8","#,##0.##","17.7","Stubborn Soda"
"Stubborn Soda","IBC","Enterprise\New Site\Packaging\packagingLine1\Filler","","cpm","Int4","#,##0.##","88","Enterprise\New Site\Packaging\packagingLine1\Filler - Default"
"Stubborn Soda","Line Speed","Enterprise\New Site\Packaging\packagingLine1\Filler","","cpm","Int4","#,##0.##","99","Stubborn Soda"

Sepasoft MES Module Suite