Sepasoft MES Module Suite
system.mes.getAvailableMaterialLots(materialProperty, lotNameSearchPattern, equipmentPath)
Get the Material Lots available for use according to a material resource defined within a segment. This look-up function limits the lots returned based on the equipment and name pattern, ordering them according to the Lot Handling Mode of the equipment in question.
Syntax
system.mes.getAvailableMaterialLots(materialProperty, lotNameSearchPattern, equipmentPath)
- Parameters
complexProperty materialResourceProperty - The material resource from an Operations Segment, defining what materials fulfill necessary requirements for use within the segment.
String lotNameSearchPattern - The search string for the lot number (also known as lot name). Can take single ("?") or multi-character ("*") wildcards.
String equipmentPath - The equipment path for equipment where the material lot is located. Note, an Equipment Class name or Supplemental Equipment item name can be used here.
- Returns
MESList<MESObjectLink> matLotLinks - A list of MESObjectLinks that each have a reference to an MESMaterialLot object.
- Scope
All
Code Examples
Python |
destinationEquipmentPath = 'New Enterprise\Site 1\Area 1\Furnace' obj = system.mes.loadMESObject('Load Furnace', 'OperationsSegment') seg = system.mes.createSegment(obj, destinationEquipmentPath) matprop = seg.getMaterialProperty('Material In') supplementalEquipment1 = 'Wagon 1' supplementalEquipment2 = 'Wagon 2' lots = system.mes.getMaterialLotsAvailable(matprop, 100, '', supplementalEquipment1) print 'LIFO' for lot in lots: print lot lots = system.mes.getMaterialLotsAvailable(matprop, 100, '', supplementalEquipment2) print 'FIFO' for lot in lots: print lot |
Output
Code |
>>> LIFO Ignition-2a481eac5ffd-0000000020 - Wagon 1 Ignition-2a481eac5ffd-0000000021 - Wagon 1 Ignition-2a481eac5ffd-0000000022 - Wagon 1 Ignition-2a481eac5ffd-0000000023 - Wagon 1 Ignition-2a481eac5ffd-0000000024 - Wagon 1 Ignition-2a481eac5ffd-0000000025 - Wagon 1 Ignition-2a481eac5ffd-0000000026 - Wagon 1 Ignition-2a481eac5ffd-0000000043 - Wagon 1 Ignition-2a481eac5ffd-0000000045 - Wagon 1 FIFO Ignition-2a481eac5ffd-0000000044 - Wagon 2 Ignition-2a481eac5ffd-0000000038 - Wagon 2 Ignition-2a481eac5ffd-0000000037 - Wagon 2 Ignition-2a481eac5ffd-0000000036 - Wagon 2 Ignition-2a481eac5ffd-0000000033 - Wagon 2 Ignition-2a481eac5ffd-0000000032 - Wagon 2 Ignition-2a481eac5ffd-0000000031 - Wagon 2 Ignition-2a481eac5ffd-0000000029 - Wagon 2 Ignition-2a481eac5ffd-0000000030 - Wagon 2 Ignition-2a481eac5ffd-0000000028 - Wagon 2 Ignition-2a481eac5ffd-0000000027 - Wagon 2 >>> |
Sepasoft MES Module Suite