system.mes.getEquipmentScheduleEntries

Sepasoft MES Module Suite

system.mes.getEquipmentScheduleEntries(equipmentPath, beginDate, endDate, categoryFilter, includeProgress)

Return entries that have been scheduled for an equipment path. The script function returns a MESList object containing MESScheduleEntry objects.

Information The function requires an additional argument on the Gateway script which is the name of the project.

Syntax

system.mes.getEquipmentScheduleEntries(equipmentPath, beginDate, endDate, categoryFilter, includeProgress)

  • Parameters

String equipmentPath - The path for the equipment to return the schedule entries for.  

Date  beginDate - The beginning date of schedule entries to include in the results.  If datetime is passed in, the time portion of the value is ignored.

Date  endDate - The ending date of schedule entries to include in the results.  If datetime is passed in, the time portion of the value is ignored.

String  categoryFilter - The schedule-entry categories to include in the results. Multiple schedule categories can be included by separating them with commas.  Use a comma separated, case insensitive list of category names with no spaces between values.

Boolean  includeProgress - If true, each schedule entry will include progress details. Note, this requires more overhead and should only be used if necessary.

  • Returns

MESList<MESScheduleEntry> - A list containing MESScheduleEntry objects. Each MESScheduleEntry object contains the links to the operations schedule, operations request, operations response (if one exists) and more schedule details. See MESScheduleEntry in the MES help documentation for more information. 

  • Scope

All

Python
#specify the equipment path
eqPath = '[global]\Enterprise\Site\Area\Line 1'
#define the start and end dates
begin = system.date.addDays(system.date.now(), -10)
end = system.date.addDays(system.date.now(), 10)
 
#let category be 'Active'
category = 'Active'
 
#Gets the equipment schedule entries
list = system.mes.getEquipmentScheduleEntries(eqPath, begin, end, category, False)
print list
for item in list:
	print item.getScheduledStartDate()
	if item.hasMESOperationsScheduleLink():
		print item.getMESOperationsScheduleLink()
		print item.getMESOperationsRequestLink()
		
	if item.hasMESOperationsResponseLink():
		print item.getMESOperationsResponseLink()
 
	print '
'

Output

Code
Size 3
2017-04-14 11:23:00.0
(type: Operations Schedule,  uuid: 8689710a-71aa-4c1e-8a9a-50205d34568f)
PC01-Enterprise:Site:Area:Line 1 ; Operations Request
 
2017-04-14 12:23:01.0
(type: Operations Schedule,  uuid: d4769a8b-e884-430f-a5c0-616fbf8201f5)
PC02-Enterprise:Site:Area:Line 1 ; Operations Request

2017-04-18 06:45:07.0
(type: Operations Schedule,  uuid: 0d1d07bc-2da5-4585-8c91-988c95b36281)
PC01-Enterprise:Site:Area:Line 1 ; Operations Request

Sepasoft MES Module Suite