Get Options For Segment Selections 3.0

Overview

List of MESObjectLink objects representing the options for segment selections can be obtained through scripting. Here's an example on how to retrieve the available MES reference options for the specified MES reference property.

Applies To and Version Info

This feature applies to Track and Trace module and is available in all versions.

Scripting

Lot Equipment Reference Property

The segment will allow pulling lots from this equipment reference, but will prevent selecting lots located in other equipment.

 

Code
seg = system.mes.createSegment('Put Mixed Nuts into Bin', 'Enterprise\Site\Nuts\Nut Mixing', True)
  
#Get options for equipment that the lot can be retrieved from or stored
lotEquipmentOptList = system.mes.getAvailableReferenceOptions(seg, 'Material.Material In.LotEquipmentRef', 'All Equipment', '', False, 100, '')
for ndx in range(lotEquipmentOptList.size()):
    print lotEquipmentOptList.get(ndx) 


Material Reference Property

This property will prevent including any other material lots other than the lots for this material reference.


Code
seg = system.mes.createSegment('Put Mixed Nuts into Bin', 'Enterprise\Site\Nuts\Nut Mixing', True)
  
#Get options for material definition that represents the lot
lotMaterialOptList = system.mes.getAvailableReferenceOptions(seg, 'Material.Material In.LotMaterialRef', 'MaterialDef', '', False, 100, '')
for ndx in range(lotMaterialOptList.size()):
    print lotMaterialOptList.get(ndx)  


Personnel Reference Property

This property will prevent including any other material lots other than the lots for this personnel reference.

 

Code
seg = system.mes.createSegment('Put Mixed Nuts into Bin', 'Enterprise\Site\Nuts\Nut Mixing', True)  
  
#Get options for personnel
personOptList = system.mes.getAvailableReferenceOptions(seg, 'PERSONNEL.Operator.PersonRef', 'ResponsePerson', '', False, 100, '')
for ndx in range(personOptList.size()):
    print personOptList.get(ndx) 


 

Supplemental Equipment Reference Property

This property will prevent including any other material lots other than the lots for this supplemental equipment reference.

 

Code
seg = system.mes.createSegment('Put Mixed Nuts into Bin', 'Enterprise\Site\Nuts\Nut Mixing', True)
#Get options for supplemental equipment
supplEquipOptList = system.mes.getAvailableReferenceOptions(seg, 'SupplEquip.Extra Equipment.EquipmentRef', 'ResponseEquipment', '', False, 100, '')
for ndx in range(supplEquipOptList.size()):
    print supplEquipOptList.get(ndx)


References

system.mes.getAvailableReferenceOptions

Keywords

Segment Selection