Description

Returns a new instance of a MESObjectLink object for the supplied mesObject. This is typically used when a script function requires a MESObjectLink object as a parameter and the full MES object exists.

Syntax

system.mes.object.link.create(mesObject)

 

  • Parameters

AbstractMESObject mesObject - An MES object object to based the new MESObjectLink. The MES object can be any of the MES objects such as MaterialClass, MaterialLot, OperationSegment, etc. that inherit from AbstractMESObject.

  • Returns

A new instance of a MES Object Link object.

Code Examples
Code Snippet
obj = system.mes.createMESObject('MaterialClass')
objLink = system.mes.object.link.create(obj)
Description

Returns a new instance of a MES Object Link object for the supplied mesObjectType and mesObjectUUID. This is typically used when a script function requires a MESObjectLink object as a parameter and the MES object type and UUID are known.

Syntax

system.mes.object.link.create(mesObjectType, mesObjectUUID)

 

  • Parameters

MESObjectTypes mesObjectType - The type of MES object to create a link for. See MESObjectTypes for the available types.

String mesObjectUUID - The UUID of MES object to create a link for. See UUIDs for more information.

  • Returns

A new instance of a MES Object Link object.

Code Examples
Code Snippet
objLink = system.mes.object.link.create('OperationsDefinition', 'a8a3771b-6330-423b-89fb-b54b7933fe3e')
print objLink.getMESObject()
Output
OperationsDefinition (a8a3771b-6330-423b-89fb-b54b7933fe3e, Receive Steel, 0 parents, 2 children, 5 custom properties, 2 complex properties)
Description

Returns a new instance of a MESObjectLink object for the supplied mesObjectType and mesObjectUUID. This is typically used when a script function requires a MESObjectLink object as a parameter and the MES object type and UUID are known.

Syntax

system.mes.object.link.create(mesObjectTypeName, mesObjectUUID)

 

  • Parameters

String mesObjectType - The name of the type of MES object to create a link for. See MESObjectTypes for the available types.

String mesObjectUUID - The UUID of MES object to create a link for. See UUIDs for more information.

  • Returns

A new instance of a MESObjectLink object.

Code Examples
Code Snippet
objLink = system.mes.object.link.create('EquipmentClass', 'd4baa7fb-1251-4b9d-8122-a52fc64d4df4')
Description

Returns a new instance of a MES Object Link object for the supplied mesObjectType, mesObjectUUID and name. This is typically used when a script function requires a MESObjectLink object as a parameter and the MES object type, UUID and name are known.

Syntax

system.mes.object.link.create(mesObjectType, mesObjectUUID, name)

 

  • Parameters

MESObjectTypes mesObjectType - The type of MES object to create a link for. See MESObjectTypes for the available types.

String mesObjectUUID - The UUID of MES object to create a link for. See UUIDs for more information.

String name - The name of the MES object.

  • Returns

A new instance of a MES Object Link object. 

Code Examples
Code Snippet
objLink = system.mes.object.link.create('StorageUnit', '8da06ff8-2922-4e0c-a01a-e7cda6899a0e', 'Vinegar Tank 1')
Description

Returns a new instance of a MES Object Link object for the supplied mesObjectType name, mesObjectUUID and name. This is typically used when a script function requires a MESObjectLink object as a parameter and the MES object type, UUID and name are known.

Syntax

system.mes.object.link.create(mesObjectTypeName, mesObjectUUID, name)

 

  • Parameters

String mesObjectType - The name of the type of MES object to create a link for. See MESObjectTypes for the available types.

String mesObjectUUID - The UUID of MES object to create a link for. See UUIDs for more information.

String name - The name of the MES object.

  • Returns

A new instance of a MES Object Link object. 

Code Examples
Code Snippet
objLink = system.mes.object.link.create('MaterialDef', 'd4baa7fb-1251-4b9d-8122-a52fc64d4df4', 'Box')
Description

Returns a new instance of a MES Object Link object for the supplied mesObjectType name, mesObjectUUID, version and name. This is typically used when a script function requires a MESObjectLink object as a parameter and the MES object type, UUID, version and name are known.

Syntax

system.mes.object.link.create(mesObjectTypeName, mesObjectUUID, version, name)

 

  • Parameters

String mesObjectType - The name of the type of MES object to create a link for. See MESObjectTypes for the available types.

String mesObjectUUID - The UUID of MES object to create a link for. See UUIDs for more information.

Integer version - The integer representing the version number.

String name - The name of the MES object.

  • Returns

A new instance of a MES Object Link object. 

Code Examples
Code Snippet
objLink = system.mes.object.link.create('MaterialDef', 'd4baa7fb-1251-4b9d-8122-a52fc64d4df4', 5, Box')

 

 

  • No labels