Skip to end of metadata
Go to start of metadata

Description

A component that is added to manage recipes. This is just one method of managing recipes and for more information on the other methods see the Using the Recipe Editor section.

 

Component Palette


 

Component Properties

Properties are provided that can be set to affect the operation and look of the component. They can be set through the Property Editor in the Designer or through scripting.

Example
event.source.parent.getComponent('Recipe Editor').enableRecipeEdit = False

 Behavior
NameScriptingProperty TypeDescription
Enable Security EditingenableSecurityEditbooleanIf true, allow the user to edit recipe value security settings.
Enable Recipe EditingenableRecipeEditbooleanIf true, allow the user to add, rename and remove recipes.
Enable Recipe State CreationenableRecipeStateCreationbooleanIf true, allow the user to create recipe states.
Enable Recipe Group CreationenableRecipeGroupCreationbooleanIf true, allow the user to create recipe groups.
Require NoterequireNotebooleanIf true, the user must enter a note when any receipe values are changed.
Read OnlyreadOnlybooleanIf true, then user cannot select or cancel recipes.
User Menu ItemsuserMenuItemsDatasetDataset that stores user menu items.
 Data
NameScriptingProperty TypeDescription
Item Path FilteritemPathFilterStringOptional production item path filter to limit recipe values shown. ? and * can be used as wildcards
Recipe Name FilterrecipeNameFilterStringOptional recipe name filter to limit recipe values shown. ? and * can be used as wildcards
Recipe Value Name FilterrecipeValueNameFilterStringOptional recipe value name filter to limit recipe values shown. ? and * can be used as wildcards

Recipe State Filter

recipeStateFilterStringOptional recipe state name filter to limit recipe values shown. ? and * can be used as wildcards
Recipe Group FilterrecipeGroupFilterStringOptional recipe group name filter to limit recipe values shown. ? and * can be used as wildcards
Show Item DefaultsshowItemDefaultsbooleanIf true, show default values for production items.
Show Item ChildrenshowItemChildrenbooleanIf true, show production item children.
Show Sub RecipesshowSubRecipesbooleanIf true, show sub recipe values for production items.
Show RecipesshowRecipesbooleanIf true, show recipes.
Show Master RecipesshowMasterRecipesbooleanIf true, show master recipes.
Show DescendantsshowDescendantsbooleanIf true, show recipe descendants.
Show Recipe ItemsshowRecipeItemsbooleanIf true, show production items for recipes.
Show ValuesshowValuesbooleanIf true, show recipe values.
Recipe Value CategorycategoryStringCategory of recipe values to show. Where 1 is recipe values created by the recipe module, 2 is recipe values created by the OEE module and 3 is recipe values created by the SPC module. Use \"\" to include all categories.
 Appearance
NameScriptingProperty TypeDescription
Recipe Display FormatrecipeDisplayFormatStringFormat for the recipe display for recipe nodes. You can use the reserved words: {RecipeName}, {State}, {Group}.
Default Row HeightdefaultRowHeightintDefault row height of the value table.
Max Recipe Value RowsmaxRecipeValueRowsintMaximum number of recipe values to show before scrolling.
Popup Panel FontpanelFontFontFont to use for the popup panel.
Value Table FontvalueTableFontFontFont to use for the value table.
Value Table Header FontvalueTableHeaderFontFontFont to use for the value table header.
Recipes Icon PathrecipesIconPathStringRelative path of an icon image representing multiple recipes.
Recipe Icon PathrecipeIconPathStringRelative path of an icon image representing a single recipe.
Recipe Descendants Icon PathdescendantsIconPathStringRelative path of an icon image representing recipe descendants.
Default Values Icon PathdefaultValuesIconPathStringRelative path of an icon image representing production item default values.
Sub Recipes Icon PathsubRecipesIconPathStringRelative path of an icon image representing multiple sub recipes for a production item.
Sub Recipe Icon PathsubRecipeIconPathStringRelative path of an icon image representing a single sub recipe for a production item.
Default SubRecipe Icon PathdefaultSubRecipeIconPathStringRelative path of an icon image representing the default sub recipe for a production item.
Prod Item Icon PathprodItemIconPathStringRelative path of an icon image representing a production item.
Menu Add Icon PathmenuAddIconPathStringRelative path of an icon image appearing for the add menu item.
Menu Edit Icon PathmenuEditIconPathStringRelative path of an icon image appearing for the edit menu item.
Menu Rename Icon PathmenuRenameIconPathStringRelative path of an icon image appearing for the rename menu item.
Menu Delete Icon PathmenuDeleteIconPathStringRelative path of an icon image appearing for the delete menu item.
Menu Revert Icon PathmenuRevertIconPathStringRelative path of an icon image appearing for the revert menu item.
Menu Security Icon PathmenuSecurityIconPathStringRelative path of an icon image appearing for the security menu item.
Menu Select Items Icon PathmenuSelectItemIconPathStringRelative path of an icon image appearing for the select items menu item.
Note Panel Icon PathnotePanelIconPathStringRelative path of an icon image appearing on the note panel.
Security Panel Icon PathsecurityPanelIconPathStringRelative path of an icon image appearing on the security panel.
Item Select Panel Icon PathitemSelectPanelIconPathStringRelative path of an icon image appearing on the production item select panel.
Note Background ColornoteBackgroundColorColorBackground color of the note panel.
Security Background ColorsecurityBackgroundColorColorBackground color of the security panel.
Item Selector Background ColoritemSelectorBackgroundColorColorBackground color of the select production item panel.
Menu Import Icon PathmenuImportIconPathStringRelative path of an icon image appearing for the import menu item.
Menu Export Icon PathmenuExportIconPathStringRelative path of an icon image appearing for the export menu item.
Add Panel Icon PathaddPanelIconPathStringRelative path of an icon image appearing on the recipe add panel.
Edit Panel Icon PatheditPanelIconPathStringRelative path of an icon image appearing on the recipe edit panel.
Export Panel Icon PathexportPanelIconPathStringRelative path of an icon image appearing on the export panel.
String Editor Icon PathstringEditorIconPathStringRelative path of an icon image appearing for string editor on the recipe value table.
Add Background ColoraddBackgroundColorColorBackground color of the recipe add panel.
Edit Background ColoreditBackgroundColorColorBackground color of the recipe edit panel.
Export Background ColorexportBackgroundColorColorBackground color of the export panel.
String Editor Background ColorstringEditorBackgroundColorColorBackground color of the string editor panel.
String Editor Slide DirectionstringEditorSlideDirectionintSlide direction of the string editor panel.

 

Event Handlers

Event handlers provide the ability to add custom script when a user interacts with a component such as by clicking a mouse, selecting a menu item or when a component property changes.

 menu
 userMenuItemClicked

This event fires when the menu item is clicked, or if the user selects the menu item using the keyboard and presses the Enter key. It can also occur if an access key or shortcut key is pressed that is associated with the MenuItem.

PropertyDescription
.sourceThe component that fired this event.
.menuItemNameName of the user menu item that triggered the event.
.nodeNameName of the node. This is the same as the name of the MES object that is associated with the node.
.objectTypeName of the MES object type that is associated with the node.
.uuidUUID of the MES object that is associated to the node.
.lotUUIDUUID of the material lot.
.lotNameName of the material lot.
.lotSequenceThe sequence number associated with the material lot.
.lotUseThe lot use type of the material.
.beginDateTimeDate and Time at which the event was triggered.
.materialUUIDUUID of the material.
.materialNameName of the material.
.lotEquipmentUUIDUUID of the equipment lot.
.lotEquipmentNameName of the equipment lot.
.segmentUUIDUUID of the segment.
.segmentNameName of the segment.
.segmentEquipmentUUIDUUID of the segment equipment.
.segmentEquipmentNameName of the segment equipment.
menuItem = event.getMenuItemName()
if menuItem == 'Change Log':
	recipeName = event.getSelectedRecipe()
	valueName = event.getSelectedValueName()
	itemPath = event.getSelectedItemPath()
	#Do something....
elif menuItem == 'Copy Recipe':
	#Do Something...
	pass
 mouse
 mouseClicked

This event signifies a mouse click on the source component. A mouse click the combination of a mouse press and a mouse release, both of which must have occurred over the source component. Note that this event fires after the pressed and released events have fired.

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseEntered

This event fires when the mouse enters the space over the source component.

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseExited

This event fires when the mouse leaves the space over the source component.

 

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mousePressed

This event fires when a mouse button is pressed down on the source component.

 

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseReleased

This event fires when a mouse button is released, if that mouse button's press happened over this component.

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseMotion
 mouseDragged

Fires when the mouse moves over a component after a button has been pushed.

 

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 mouseMoved

Fires when the mouse moves over a component, but no buttons are pushed.

PropertyDescription
.sourceThe component that fired this event.
.buttonThe code for the button that caused this event to fire.
.clickCountThe number of mouse clicks associated with this event.
.xThe x-coordinate (with respect to the source component) of this mouse event.
.yThe y-coordinate (with respect to the source component) of this mouse event.
.popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
.altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
.controlDownTrue (1) if the Ctrl key was held down during this event, false (0) otherwise.
.shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.
 propertyChange
 propertyChange

Fires whenever a bindable property of the source component changes. This works for standard and custom (dynamic) properties.

PropertyDescription
.sourceThe component that fired this event.
.newValueThe new value that this property changed to.
.oldValueThe value that this property was before it changed. Note that not all components include an accurate oldValue in their events.
.propertyNameThe name of the property that changed. NOTE: Remember to always filter out these events for the property that you are looking for! Components often have many properties that change.

 


 

Extension Functions

 getStringValueOptions
  • Description

Get the options for the string values of the recipe.

  • Parameters

itemPath - The item path.

recipeName - The recipe name.

valueName - The recipe value name.

  • Returns

List of string values.

  • Scope

Client


 

Custom Methods

Custom methods allow you to add your own component functions to a component that can be called through scripting. This is a useful and clean method of re-using script that is specific to the component (say you want to update a visual aspect of the component in the same way whether a user clicks on the component or a window property value changes). See Component Custom Methods in the Ignition Help Manual for more information.

 


 

Customizers

This component does not have any custom properties.


 

Component Functions

This component provide the following functions that can be called on it. If this component has been dropped onto the windows root container, the path and an example call would be event.source.parent.getComponent('Recipe Editor').changeLocalizationString(key, displayText).

 changeLocalizationString(key, displayText)
  • Description

Any of the text that is displayed in the recipe editor change be changed. For example, displaying Recipes for the root recipe node can be replaced with  Products. This can be done for any static text in the recipe editor including menu items.

  • Parameters

String key - The key to the string value to change.

Recipe Editor component keys:

node.recipes 

node.default.values 

node.subrecipes 

node.subrecipes.default 

node.descendants 

node.subrecipes.default  

menu.recipe.add 

menu.recipe.delete 

menu.recipe.rename 

menu.value.revert 

menu.recipe.revertvalues 

menu.value.read 

menu.recipe.setvalues

menu.value.security

menu.recipe.selectitems

menu.subrecipe.add

menu.subrecipe.delete

menu.subrecipe.rename

menu.recipe.import

menu.recipe.export

panel.item.select.inst

panel.security.inst

panel.note.inst

panel.cancel.desc

panel.ok.desc

String displayText - The new text to replace the existing display text.

  • Return

Nothing

  • Scope

Client

 

Code Examples
Code Snippet
#Sample script to change the root Recipes node text to Spanish.
 
Script from internalFrameActivated event on the window
system.gui.getParentWindow(event).getComponentForPath('Root Container.Recipe TreeView').changeLocalizationString("node.recipes", "Receta")
  • No labels