Sepasoft MES Module Suite
system.mes.workorder.createMESWorkOrder(workOrderName, materialLink)
Creates a work order.
|
Work orders must be uniquely named. Duplicate names are not allowed. |
Characters Not Allowed in Names
These characters are reserved by the Sepasoft modules.
Production Equipment
. ? ! # % ^ * ~ [ ] { } + = ` \ @ & ( ) < >,
MES Person
. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | < >
Other MES Objects
. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | ,
Machine Recipe Name in Settings & Changeover Module
Follows the same convention as Other MES Objects
Exception: Full-stop period . is allowed as of 3.81.10 SP2
Batch Names in Batch Procedure Module
. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | ,
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 Example
Python |
##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
Code |
WorkOrder (1c397a0d-6ae5-4591-8a54-a6278041b72a, 7878, 0 parents, 0 children, 0 custom properties, 0 complex properties) |
Sepasoft MES Module Suite