system.mes.changeScheduleCategory

Sepasoft MES Module Suite

Change Category of Schedules

These script functions are used to alter the category of operation schedules. The first signature is for batch changes and the second is for individual schedules.

system.mes.changeScheduleCategory(fromDate, toDate, fromCategory, toCategory)

Change the category of all operations schedule objects within the given date range with matching category.

Information

Active and Actual schedule categories are reserved for currently active and completed respectively. Custom categories are also acceptable.

Syntax

system.mes.changeScheduleCategory(fromDate, toDate, fromCategory, toCategory)

  • Parameters

Date fromDate - The date to begin changing schedules.

Date toDate - The date to stop changing schedules.

String fromCategory - The schedule category to match before changing to the new category.

String toCategory - New category to assigned to the operation schedule.

  • Returns

Nothing

  • Scope

All

Python
#This example would show how to change the ScheduleCategory to 'Held'  
 
if(event.getMenuItemName() == 'Hold'):
    uuid = event.getScheduleEntry().getMESOperationsScheduleLink().getMESObjectUUID()
    system.mes.changeScheduleCategory(uuid, 'Held')

system.mes.changeScheduleCategory(operationsScheduleUUID, toCategory)

Change the category of an operations schedule object.

Syntax

system.mes.changeScheduleCategory(operationsScheduleUUID, toCategory)

  • Parameters

Integer operationsScheduleUUID - The UUID of operationSchedule to change the category for.

String toCategory - New category to assigned to the operation schedule.

  • Returns

Nothing

  • Scope

All

Python
#This example would show how to change the ScheduleCategory to 'Held'  
 
if(event.getMenuItemName() == 'Hold'):
    uuid = event.getScheduleEntry().getMESOperationsScheduleLink().getMESObjectUUID()
    system.mes.changeScheduleCategory(uuid, 'Held')

Python
# This example would show how to change the ScheduleCategory to 'Active'

elif(event.getMenuItemName() == 'Release Hold'):
uuid = event.getScheduleEntry().getMESOperationsScheduleLink().getMESObjectUUID()
    system.mes.changeScheduleCategory(uuid, 'Active')

Sepasoft MES Module Suite