Sepasoft MES Module Suite
Change Lot Filters Object
A ChangeLogFilters object is used when requesting machine recipe change logs with the system.recipe.getChangelogHistory script function to narrow down the results that are returned. For example, if you only want the change log history for a specific production item (machine) and specific date range, the ChangeLogFilters object properties are set appropriately and are passed as parameters to the system.recipe.getChangelogHistory script function.
Object Creation
createNew()
Description
Returns a new instance of a ChangelogFilters object.
Info
|
After setting various filter properties, it is used with the system.recipe.getChangelogHistory script function. |
Syntax
createNew()
- Parameters
None
- Returns
The new ChangelogFilters object.
- Scope
All
Code Snippets
Python |
changeLogFilter = system.recipe.filter.changelog.createNew() projectName = system.util.getProjectName() eqPath = "Enterprise\\Site 1\\OEE Area\\Packaging Line 1" end = system.date.now() start = system.date.addHours(end, -24) changeLogFilter.setItemPathFilter(eqPath) ##Note the recipe value and sub recipe value categories: changeLogFilter.addCategory("sub recipe value") # for default/sub-recipe values changeLogFilter.addCategory("recipe value") # for master/descendant values changeLogFilter.setProjectName(projectName) changeLogFilter.setFromDate(start) changeLogFilter.setToDate(end) ##Initialize a dataset of the changelog history. ds = system.recipe.getChangelogHistory(changeLogFilter) |
Properties
addCategory(category)
Description
Add a category to include in the recipe change log history results.
Info
|
Multiple categories can be specified to be included in the results. Valid values are :
|
Syntax
addCategory(category)
- Parameters
String category - The category to include in the change log history for.
- Returns
Nothing
- Scope
All
Example
Python |
changeLogFilter = system.recipe.filter.changelog.createNew() projectName = system.util.getProjectName() eqPath = "Enterprise\\Site 1\\OEE Area\\Packaging Line 1" end = system.date.now() start = system.date.addHours(end, -24) changeLogFilter.setItemPathFilter(eqPath) ##Note the recipe value and sub recipe value categories: changeLogFilter.addCategory("sub recipe value") # for default/sub-recipe values changeLogFilter.addCategory("recipe value") # for master/descendant values changeLogFilter.setProjectName(projectName) changeLogFilter.setFromDate(start) changeLogFilter.setToDate(end) ##Initialize a dataset of the changelog history. ds = system.recipe.getChangelogHistory(changeLogFilter) |
getRowLimit()
Description
Gets the current row limit argument that is set on the filter.
Syntax
getRowLimit()
- Parameters
Nothing
- Returns
An integer defining the maximum amount of rows the change log data may return.
- Scope
All
removeCategory(category)
Description
Remove a category for what has already been added.
Info
|
Multiple categories can be specified to be removed. Valid values are :
|
Syntax
removeCategory(category)
- Parameters
String category - The category to be removed from the log history for.
- Returns
Nothing
- Scope
All
setFromDate(fromDate)
Description
Set the start of the date range to return change log history for.
Syntax
setFromDate(fromDate)
- Parameters
Date fromDate - The start date to return the change log history for.
- Returns
Nothing
- Scope
All
setItemPathFilter(itemPath)
Description
Set the path of the production item to return change log history for.
Syntax
setItemPathFilter(itemPath)
- Parameters
String itemPath - The item path to a production line, cell, cell group or location.
- Returns
Nothing
- Scope
All
setProjectName(projectName)
Description
Set the project name to read recipe change log history.
|
Recipe change log history is kept by project, and the project name is required with the system.recipe.getChangelogHistory script function. |
Syntax
setProjectName(projectName)
- Parameters
String projectName - The project name to read the change log history for.
- Returns
Nothing
- Scope
All
setRecipeNameFilter(recipeNameFilter)
Description
Set an optional recipe filter.
|
The filter can contain ? and * wild card characters. For example: "Recipe C*" will include all recipes that start with Recipe C. Recipe C1 and Recipe C21 will be included but Recipe D1 will not. |
Syntax
setRecipeNameFilter(recipeNameFilter)
- Parameters
String recipeNameFilter - The recipe name to filter the results for.
- Returns
Nothing
- Scope
All
setRowLimit(rowLimit)
Description
Limits the amount of rows to query when accumulating Recipe Change Log data. The Default limit is 2000.
Syntax
setRowLimit(rowLimit)
- Parameters
Integer rowLimit - The maximum amount of rows that may be processed.
- Returns
Nothing
- Scope
All
setSubProductCodeFilter(subProductCodeFilter)
Description
Set an optional sub product code filter. The filter can contain ? and * wild card characters.
Syntax
setSubProductCodeFilter(subProductCodeFilter)
- Parameters
String subProductCodeFilter - The subProductCode to filter the results for.
- Returns
Nothing
- Scope
All
setToDate(toDate)
Description
Set the end of the date range to return change log history for.
Syntax
setToDate(toDate)
- Parameters
Date toDate - The end date to return the change log history for.
- Returns
Nothing
- Scope
All
setUserFilter(userNameFilter)
Description
Set an optional user name filter. The filter can contain ? and * wild card characters.
Syntax
setUserFilter(userNameFilter)
- Parameters
String userNameFilter - The userName to filter the results for.
- Returns
Nothing
- Scope
All
setValueNameFilter(recipeValueNameFilter)
Description
Set an optional recipe value name filter. The filter can contain ? and * wild card characters.
Syntax
setValueNameFilter(recipeValueNameFilter)
- Parameters
String recipeValueNameFilter - The recipeValueName to filter the results for.
- Returns
Nothing
- Scope
All
Sepasoft MES Module Suite