Sepasoft MES Module Suite
MESObjectFilter
The MESObjectFilter object defines what types of MES objects to return by using scripting and object functions.
Inherits properties, events and functions from:
Create MESObjectFilter
The system.mes.object.filter.createFilter function can be used to create this type of object.
Return MESObjectFilter
- system.mes.exportMESObjects
- system.mes.getMESObjectChildLinks
- system.mes.loadMESObjects
- system.mes.searchMESObjects
Object Functions
This object provides the following functions:
getCustomPropertyNamePattern()
Get the custom property name pattern used to filter the results.
getCustomPropertyNamePattern()
- Parameters
None
- Returns
String The custom property name pattern.
getCustomPropertyValueFilter()
Get the list of MESPropertyValueFilter used to filter the results.
getCustomPropertyValueFilter()
- Parameters
None
- Returns
List of MESPropertyValueFilter - The custom property value list.
getEnabledStateName()
Get the enable state to filter the results.
getEnabledStateName()
- Parameters
None
- Returns
String name - The name of the enable state.
getExcludedEquipmentPathList()
Gets the list of equipment paths that are excluded.
getExcludedEquipmentPathList()
- Parameters
None
- Returns
List<String> pathList - The list of equipment paths that are excluded.
getMESObjectNamePattern()
Get the MES object name pattern used to filter the results.
getMESObjectTypeName()
Return the list of names of the MES object types the filter is set for.
getMESObjectTypeName()
- Parameters
None
- Returns
List The list of names of MES object types the filter is set for.
getMesObjectTypes()
Gets the list of MES object types associated with this object filter.
getMesObjectTypes()
- Parameters
None
- Returns
MESObjectTypes - A list of mes object types associated with this filter.
- Scope
All
getMESObjectUUIDList()
Returns a list of MES object UUIDs to return in the results.
getMESObjectUUIDList()
- Parameters
None
- Returns
List of String - A list of MES object UUIDs.
filter=system.mes.object.filter.createFilter() #Gets the list of uuid.list=filter.getMESObjectUUIDList() Addind another item to the list.list.add('5253ccae-47b4-4dc2-954f-900ffa8636eb') |
getPrimaryClassFilter()
Gets the primary class (parent class) filter that has been set.
getPrimaryClassFilter()
- Parameters
None
- Returns
The primary class filter which was previously defined to filter the results.
getPrimaryMESObjectPath()
Gets the primary (parent) MES object path that was set to filter the results.
getPrimaryMESObjectPath()
- Parameters
None
- Returns
The primary MES object path to filter the results.
getPrimaryMESObjectUUID()
Get the UUID of the primary (parent) MES object to include in the results.
getPrimaryMESObjectUUID()
- Parameters
None
- Returns
String The primary MES object UUID.
hasCustomPropertyNamePattern()
Checks for the existence of a custom property name pattern.
hasCustomPropertyNamePattern()
- Parameters
None
- Returns
boolean - True, if there exist a custom property name pattern and False otherwise.
- Scope
All
Checks if there is a custom property value to filter the results.
hasCustomPropertyValueFilter()
- Parameters
None
- Returns
boolean - True, if there exist a custom property value filter and False otherwise.
- Scope
All
Checks if there is an MES object name pattern to filter the results.
hasMESObjectNamePattern()
- Parameters
None
- Returns
boolean - True, if there exist an MES object name pattern and False otherwise.
- Scope
All
Checks whether there is any MES object type name to filter the results.
hasMESObjectTypes()
- Parameters
None
- Returns
boolean - True, if there exist any MES object type defined to filter the results and False otherwise.
- Scope
All
Checks if there is MES object uuids to filter the results.
hasMESObjectUUIDs()
- Parameters
None
- Returns
boolean - True, if there exist some uuids to filter the results.
Checks if there is any primary class (parent class) filter associated with this MES object filter.
hasPrimaryClassFilter()
- Parameters
None
- Returns
boolean - True, if there exist a primary class filter and False otherwise.
Checks whether there is a primary (parent) MES object path to filter the results.
hasPrimaryMESObjectPath()
- Parameters
None
- Returns
boolean - True, if there exist a primary MES object path and False otherwise.
Checks for the existence of primary (parent) MES object uuid to filter the results.
hasPrimaryMESObjectUUID()
- Parameters
None
- Returns
boolean - True, if there exist a primary (parent) MES object uuid and False otherwise.
Use this function to verify if inactive equipment is set to be excluded when filtering.
Included in Sepasoft Versions:
MES 3.81.1 SP6 and later
MES 3.79.0 SP6 and later
isExcludeInactiveEquipment()
- Parameters
No Parameters
- Returns
Boolean: Returns True if inactive equipment is set to be excluded when filter is used
isIncludeRelated()
The results can be limited to only include the related items that is defined by this property that evaluates to true.
isIncludeRelated()
- Parameters
None
- Returns
boolean - True if the MES object include related items and False otherwise.
Checks whether the ShowEquipmentPath property is set to True.
isShowEquipmentPath()
- Parameters
None
- Returns
boolean - True if the ShowEquipmentPath property is set to True and False otherwise.
Set the custom property name pattern to filter the results. If a MES object contains a custom property that matches the custom property name pattern, then it will be included in the results.
setCustomPropertyNamePattern(customPropertyNamePattern)
- Parameters
String customPropertyNamePattern - The custom property name pattern used to filter the results.
- Returns
Nothing
1 2 | filter=system.mes.object.filter.createFilter()filter.setCustomPropertyNamePattern('Type') |
setCustomPropertyValueFilter(customPropertyValueFilter)
Set the custom property filter expressions to filter the results. Multiple expressions can be included by separating them with commas. When this is done, all sub expressions must match for the overall expression to evaluate to true. Use system.mes.object.filter.parseCustomPropertyValueFilter() script function to create the list of MESPropertyValueFilter objects.
setCustomPropertyValueFilter(customPropertyValueFilter)
- Parameters
List of MES Property Value Filter customPropertyValueFilter - The custom property value list to filter the results.
- Returns
Nothing
1 2 3 4 5 6 | #Create a filter.filter=system.mes.object.filter.createFilter() #Parses the expression and returns a list of MESPropertyValueFilter objects that are used in filters.list=system.mes.object.filter.parseCustomPropertyValueFilter('pH > 5.0,Width = 2.5')filter.setCustomPropertyValueFilter(list) |
1 2 3 4 5 6 7 | filter=system.mes.object.filter.createFilter()list=system.mes.object.filter.parseCustomPropertyValueFilter('Item Number=A12SIK')filter.setCustomPropertyValueFilter(list)list=system.mes.searchMESObjects(filter)forndx inrange(list.size()): mesObject =list.get(ndx) printmesObject.getName() |
84001 |
setEnableStateName(name)
Set the enable state to filter the results.
Options:
Disabled
Enabled
Both
Default Behavior
Defaults to 'Enabled' state if this method is not set.
setEnableStateName(name)
- Parameters
String name - The name of the enable state.
- Returns
Nothing
1 2 3 | #Here's how to set the enable state.filter=system.mes.object.filter.createFilter()filter.setEnableStateName('Disabled') |
setExcludedEquipmentPathList(excludeString)
Sets the list of equipment paths to exclude from the result string. This is NOT a filter on equipment, rather a string which is trimmed from any equipment paths in the results.
setExcludedEquipmentPathList(excludeString)
- Parameters
String excludeString - A string with equipment paths to be excluded, separated by commas.separated by commas.
- Returns
Nothing
Sets the list of equipment paths to exclude from path strings. NOT a filter of equipment. Method allows for trimming Equipment Path strings in the results.
setExcludedEquipmentPathList(excludeList)
- Parameters
List<String> pathList - The list of equipment paths to be excluded.
- Returns
Nothing
Use this function to exclude any inactive equipment defined in the Equipment Model when filtering.
Included in Sepasoft Versions:
MES 3.81.1 SP6 and later
MES 3.79.0 SP6 and later
setExcludeInactiveEquipment(Boolean)
- Parameters
Boolean: Set to True to exclude the inactive equipment in the Equipment Model when filtering.
- Returns
Nothing
1 2 3 4 5 6 7 | filter = system.mes.object.filter.createFilter()filter.setMESObjectTypeName('Line')filter.setExcludeInactiveEquipment(True)list = system.mes.searchMESObjects(filter)forndx in range(list.size()): mesObjectLink = list.get(ndx) print mesObjectLink.getName() |
Sets the include related property to filter the results.
Include Related Definition
All Objects:
- All Parent MES Objects
- All Children MES Objects
When the filtered object is either an Operations Definition or an Operations Segment more objects will be added.
Operations Definition:
- All linked Operation Segments.
- Other Operations that are referenced by the Operations Definition's Begin Triggers.
Operations Segment:
- The object from which the Operations Segment was derived from i.e. (Process Segment or another Operations Segment).
- Other Operations or Segments that are referenced by the Operations Segment's Begin Triggers.
- Other Operations that are referenced by the Operations Segment's End Triggers.
setIncludeRelated(includeRelated)
- Parameters
boolean includeRelated - Set this to True, if results should also include related MES objects.
- Returns
Nothing
setMESObjectNamePattern(mesObjectNamePattern)
Set the MES object name pattern to include in the results. It can contain wildcard characters including * or ?. The * character can be any characters and the ? character represents any single character.
setMESObjectNamePattern(mesObjectNamePattern)
- Parameters
String mesObjectNamePattern - The MES object name pattern used to filter the results.
- Returns
Nothing
1 2 3 4 5 6 7 8 9 10 | #Create a filter.filter=system.mes.object.filter.createFilter() #Here is an example for setting the name pattern.# Will return all objects with 'Turkey' at the end their name.filter.setMESObjectNamePattern('*Turkey')list=system.mes.searchMESObjects(filter)forndx inrange(list.size()): mesObject =list.get(ndx).getMESObject() printmesObject.getMESObjectType().getDisplayName() |
Response Material DefinitionMaterial DefinitionResponse Material ClassResponse Material ClassMaterial Class |
Set the MES object type name(s) to filter the results.
- If you want the MES Object Filter to return all production items in the production model, you can simply not call the 'setMESObjectTypeName() or leave it blank i.e. 'setMESObjectTypeName(''). Although there is an MESObjectTypeName of 'All Equipment', this will return an empty list.
1 2 3 4 5 6 7 | filter=system.mes.object.filter.createFilter()filter.setMESObjectTypeName('')filter.setPrimaryMESObjectPath(sitePath)list=system.mes.searchMESObjects(filter)printlistforitem inlist: printitem |
setMESObjectTypeName(mesObjectTypeNames)
- Parameters
String names - Object names separated by commas. See MES Object Type Name
- Returns
Nothing
- Scope
All
1 2 3 4 | filter=system.mes.object.filter.createFilter() #Name of MESObjectType is set to EquipmentClass and Equipment.filter.setMESObjectTypeName('EquipmentClass, Equipment') |
setMESObjectUUIDList(mesObjectUUIDList)
Set the UUIDs of the MES objects to return in the results.
Note that this is somewhat less efficient than the other methods of filtering objects, because each UUID must be individually looked up. Using other filters may improve this somewhat, such as setMESObjectTypeName().
setMESObjectUUIDList(mesObjectUUIDList)
- Parameters
List of String mesObjectUUIDList - The list of UUIDs to include in the results.
- Returns
Nothing
#create filterfilter=system.mes.object.filter.createFilter()mesObjectUUIDList =['fce508d3-23b2-4edb-a520-b78c3d043cba', 'd9c140d8-8a29-40eb-b71b-20af45307f01', 'e90552b2-5eb8-447e-8ad4-4f9b8aeeddfe']#set the object listfilter.setMESObjectUUIDList(mesObjectUUIDList) |
setPrimaryClassFilter(primaryClassFilter)
Limits the results to only include items that have the passed name as a parent object.
setPrimaryClassFilter(parentMESObjectName)
- Parameters
String parentMESObjectName - The name of the parent MES Object
- Returns
Nothing
#create filterfilter=system.mes.object.filter.createFilter()class_name ='MES Class'#set the primary class# Will return any objects that are children of the 'MES Class' MES Object.filter.setPrimaryClassFilter(class_name) |
setPrimaryMESObjectPath(primaryMESObjectPath)
Limits results to contain only objects that are children of the object referenced by passed primaryMESObjectPath
setPrimaryMESObjectPath(primaryMESObjectPath)
- Parameters
String primaryMESObjectPath - The path of the primary (parent) MES object to filter results by.
- Returns
Nothing
setPrimaryMESObjectUUID(primaryMESObjectUUID)
Limits results to contain only objects that are children of the object referenced by passed primaryMESObjectUUID
setPrimaryMESObjectUUID(primaryMESObjectUUID)
- Parameters
String primaryMESObjectUUID - The UUID of the primary (parent) MES object to filter results by.
- Returns
Nothing
1 2 3 4 5 | filter=system.mes.object.filter.createFilter()# Will return any objects that are children of the referenced object.filter.setPrimaryMESObjectUUID('73facb39-806c-4bfc-8881-cc06707a9909') |
setShowEquipmentPath(showPath)
Usage Infomation
This parameter is only useful when used with system.mes.searchMESObjects()
If set to True, the object link for each object returned is a fully qualified equipment path instead of just the object name.
setShowEquipmentPath(showPath)
- Parameters
Boolean showPath - Set to True to modify object links to be equipment paths.
- Returns
Nothing
Sepasoft MES Module Suite