system.mes.oee.createMaterialProcessSegment

Sepasoft MES Module Suite

Description

For the specified material and equipment, create the operations MES object. The operations MES object consist of the Operations Definition, an Operations Segment for changeover and an Operations Segment for production. Each material and equipment combination will have a set of MES operations objects.

Warning

If a material and line combination already exists, an exception is thrown.

Syntax

system.mes.oee.createMaterialProcessSegment(materialLink, equipmentPath)


  • Parameters

MESObjectLink materialLink - The MES object link to the material definition to base the operations MES objects on.

String equipmentPath - The equipment path to base the operations MES objects on. 

  • Returns

MESObjectList - A MESObjectList object containing the new Operations Definition and Operations Segment MES objects.

  • Scope

All

Code Examples

Code Snippet

Code
# equipment path
equipment_path = "[global]\Enterprise\Site\Area\Line 2"
# material definition link
material_def_link = system.mes.getMESObjectLinkByName('MaterialDef','MatDef1')
# create the process segment 
process_seg_list = system.mes.oee.createMaterialProcessSegment(material_def_link,equipment_path)
for process_seg_makeup_obj in process_seg_list:
    print process_seg_makeup_obj
    
system.mes.saveMESObjects(process_seg_list)

Output

Code
OperationsDefinition (8201a472-d1de-4c65-8a6f-1d6092c06566, MatDef1-Enterprise:Site:Area:Line 2, 0 parents, 0 children, 0 custom properties, 2 complex properties)
OperationsSegment (f68e3fe1-4ab4-4086-afa7-30beedd6f317, MatDef1-Enterprise:Site:Area:Line 2_CO, 0 parents, 0 children, 0 custom properties, 7 complex properties)
OperationsSegment (90db60f3-d869-4360-9606-c4b12ac553ef, MatDef1-Enterprise:Site:Area:Line 2, 0 parents, 0 children, 0 custom properties, 7 complex properties) 

Sepasoft MES Module Suite