system.recipe.setPathRecipeValues

Sepasoft MES Module Suite

system.recipe.setPathRecipeValues(itemPath, recipeName, values, note)

Set multiple recipe values for a production item. The recipe must be the same for all recipe values being set.

Syntax

system.recipe.setPathRecipeValues(itemPath, recipeName, values, note)

  • Parameters

String itemPath - The item path to a production line, cell, cell group or location.

String recipeName - Name of recipe.

PyDictionary values - A Python Dictionary containing recipe values in a name / value format.

String note - Optional note to be stored in the recipe change log.

  • Returns

Nothing

  • Scope

All

Code Examples

Python
#--- setPathRecipeValues(itemPath, recipeName, pyDictionary, note) ---
#                        (str)       (str)      (dict)      (str)
#
# function system.recipe.setPathRecipeValues() allows you to set the multiple values defined on
# a production Item. You can verify the change using the Recipe Editor. After you do
# a setItemRecipe() the associated tags will be update to these values


itemPath = "Enterprise\New Site\Packaging\packagingLine1\Filler"
recipeName = "PC_007-IBC-RB"
dict = {
        'IBC Sugar Percentage': 17.7, 
        'IBC Vanilla Percentage': 3, 
        'Max Temperature': 98, 
        'Min Temperature': 89
        }
note = 'Using py dict'
try:
    system.recipe.setPathRecipeValues(itemPath, recipeName, dict, note)
except IOError:
    print 'Attempt to set the recipe values failed!' 



Sepasoft MES Module Suite