Sepasoft MES Module Suite
MESObjectLink
The MESObjectLink object is a light weight version of an MES object. Think of it as a defined set of common information linked to the full MES object. Using a reference is faster for the operator and less costly to the server.
When only general information about an MES object is needed instead of the full details of the MES object, you can use the MESObjectLink.
You can load the MESObjectLink reference that includes Name and Type of object in a component, such as MES Object Selector, to reduce the number of entries that populate in the UI.
MESObjectLink Creation
-
system.mes.object.link.create(mesObject)
-
system.mes.object.link.create(mesObjectType, mesObjectUUID)
-
system.mes.object.link.create(mesObjectType, mesObjectUUID, name)
-
system.mes.object.link.create(mesObjectTypeName, mesObjectUUID)
-
system.mes.object.link.create(mesObjectTypeName, mesObjectUUID, name)
Create a MESObjectLink
|
mesObject = mesObjectLink.getMESObject()
|
Use
The following scripting functions use this object as well as a number of components.
Properties
Inherits properties from: AbstractMESObject
No specific object properties
Object Functions
The following functions are available. This object also Iiherits functions from the AbstractMESObject functions.
getMESObject()
Returns MES object associated with a MESObjectLink object. If the MES object has not been previously loaded, it will be loaded.
|
objLink = system.mes.object.link.create('ProcessSegment', '4c8edc76-d08b-4838-9e3f-562151eecfa0')
print objLink.getMESObject()
|
ProcessSegment (4c8edc76-d08b-4838-9e3f-562151eecfa0, Receive Steel, 1 parents, 0 children, 1 custom properties, 4 complex properties)
|
getMESObjectType()
Returns type of MES object.
|
obj = system.mes.loadMESObject('57290b1b-c734-404a-bc0f-af0f5e4d2a91')
objLink = system.mes.object.link.create(obj)
print objLink.getMESObjectType()
|
getMESObjectUUID()
Returns MESObject UUID that this MESObjectLink object is set to.
getMESObjectUUID()
None
String UUID - The unique identifier that represents the MES object.
|
matCls = system.mes.loadMESObject('Turkey', 'MaterialClass')
objLink = system.mes.object.link.create(matCls)
print objLink.getMESObjectUUID()
|
57290b1b-c734-404a-bc0f-af0f5e4d2a91
|
hasMESObject()
Returns True if MES object has been loaded into this MESObjectLink. This will be the case either after the system.mes.create(mesObject) constructor or the getMESObject() property of a MESObjectLink object has been called.
hasMESObject()
None
Boolean True if an MES object exist for the MES object link and False otherwise.
|
obj = system.mes.loadMESObjectByEquipmentPath('[global]\My Enterprise\California\Receiving\Unload Station 1')
objLink = system.mes.object.link.create(obj)
print objLink.hasMESObject()
|
hasMESObjectInfo()
Returns True if MES object information exists. This includes the MES object type and UUID. The name is not required for this property to return True.
hasMESObjectInfo()
None
Boolean True if information exist for MES object and False otherwise.
|
objLink = system.mes.object.link.create('MaterialDef', 'Box')
print objLink.hasMESObjectInfo()
|
hasName()
Returns True if the MES object name is available.
hasName()
None
Boolean True if the name of MES object is available and False otherwise.
|
obj = system.mes.loadMESObjectByEquipmentPath('[global]\My Enterprise\California\Storage\Vinegar Tanks\Vinegar Tank 1')
objLink = system.mes.object.link.create(obj)
print objLink.hasName()
|
invalidateMESObject()
This clears the previously loaded MES object associated with this MESObjectLink. This can be used to reuse a MESObjectLink object.
invalidateMESObject()
None
Nothing
|
obj = system.mes.loadMESObject('Red Wine', 'MaterialDef')
objLink = system.mes.object.link.create(obj)
objLink.invalidateMESObject()
print objLink.hasMESObject()
|
Object Events
Objects have events associated with them that allow for custom scripts to be added whenever the event occurs. Refer to
for more information.
This object inherits the
AbstractMESObject events.
No other object events are available.
Sepasoft MES Module Suite