Sepasoft MES Module Suite
system.recipe.updateRecipeValueSecurity(securityInfo)
Updates the security settings for a recipe.
Syntax
system.recipe.updateRecipeValueSecurity(securityInfo)
- Parameters
Machine Recipe Value Security Info securityInfo - The security setting to be updated.
- Returns
The updated recipe setting.
- Scope
All
Code Example 1
Python |
secInfo = system.recipe.getRecipeValueSecurity('Enterprise\Site\Area\Recipe Test 1\Recipe Test 1A', 'RV 1', True) #Cycle through and print the setting for each roll for ndx in range(secInfo.getSecurityRollCount()): recSec = secInfo.getSecurityRoll(ndx) print recSec.getSecurityRoll() print recSec.isAllowEdit() print recSec.getMinValue() print recSec.getMaxValue() print #Get a security roll for by name secRoll = secInfo.getSecurityRoll('Recipe Test') print secRoll.getSecurityRoll() print secRoll.isAllowEdit() print secRoll.getMinValue() print secRoll.getMaxValue() print #Change the settings of the security roll secRoll.setAllowEdit(True) secRoll.setMinValue(10.0) secRoll.setMaxValue(100.0) #This must be set otherwise it will inherit from the parent secInfo.setInherit(False) #Update the security settings system.recipe.updateRecipeValueSecurity(secInfo) |
Code Example 2
Python |
#This will revert to inherit the security from the parent #Get security information for a recipe value secInfo = system.recipe.getRecipeValueSecurity('Enterprise\Site\Area\Recipe Test 1\Recipe Test 1A', 'RV 1', True) #Reset the settings to inherit from the parent secInfo.setInherit(True) #Update the security settings system.recipe.updateRecipeValueSecurity(secInfo) |
Sepasoft MES Module Suite