Skip to end of metadata
Go to start of metadata
Description

Creates a work order.

Unique Name

Work orders must be uniquely named. Duplicate names are not allowed.

Naming Characters Allowed

Names must begin with a letter, digit or underscore. Subsequent characters may also include spaces and dashes. The following characters are not allowed:

ObjectCharacters not allowed
Production Equipment. ? ! # % ^ * ~ [ ] { } + = ` \, @ & ( ) < >
MES Person. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | < >
All other MES Objects. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | ,

Syntax

system.mes.workorder.createMESWorkOrder(workOrderName, materialLink)


  • Parameters

String workOrderName - Name of the work order to be created.

MESObjectLink materialLink - A MES Object Link to a valid material definition to associate to the work order.

  • Returns

MESWorkOrder - A new instance of a MESWorkOrder object.

  • Scope

All

Code Examples
Code Snippet
##Given a work order name, create the work order and then save the work order to manifest the change.
matLink = system.mes.getMESObjectLinkByName('MaterialDef', 'Fanta')
woObj=system.mes.workorder.createMESWorkOrder('7878', matLink)
system.mes.workorder.saveMESWorkOrder(woObj)
print woObj
Output
WorkOrder (1c397a0d-6ae5-4591-8a54-a6278041b72a, 7878, 0 parents, 0 children, 0 custom properties, 0 complex properties)
  • No labels