Sepasoft MES Module Suite
AbstractMESComplexProperty object
Complex Properties are predefined and vary based on the type of MES object. They are called complex properties because they have a number of members and there can be multiple instances for a given complex property type.
Base object for all complex property objects for:
See Also:
How these resource properties are used
These are used and detailed in the Process Segment reference, the Segment Dependency Property (which is detailed in the Operations Definition reference) and the Lot Reference Property (which is detailed in the Response Segment reference).
For example:
A Process Segment to mix dressing will have multiple material references. Each one will be an instance of a Material complex property. Even more complex is the Lot complex property used by the Response Segment for mixing dressing, because there will be multiple lots for each input material each with their own complex property base name. Then, if an input material lot is used up during production and switched over to another input lot, then there will be multiple instances for the same input lot reference.
If we are mixing dressing which requires vinegar that is coming from Lot 123 in vinegar tank 1, then there will be an instance of a Lot complex property for it. This complex property has a name to reference it by, and in this example we will call it "Ingredient Vinegar". Then during production of mixing dressing, we run out of vinegar in tank 1 and we switch over to vinegar tank 2. Vinegar tank 2 contains Lot 234 so there will be another Lot complex property for it with the same name "Ingredient Vinegar". Now there are two Lot complex properties that are referenced by the same name "Ingredient Vinegar". Behind the scenes, the names are modified with a post fix. As a result the Lot complex property for Lot 123 will be named "Ingredient Vinegar-1" and the one for Lot 234 will be named "Ingredient Vinegar-2". This is referred to as extended naming. Each will hold complete details of when the lot start and when it finished, quantity, etc.
Object Creation
All MES Objects have the following functions to return this object:
Python |
#load the MES object mesObject = system.mes.loadMESObject('Unload Vinegar', 'ProcessSegment') #Get complex property matRef = mesObject.getComplexProperty('Material', 'Raw Material') print matRef.getValue('MaterialUse') |
Python |
#Create and add complex property using script #Create a new process segment seg = system.mes.createMESObject('ProcessSegment') #Create and add a new material reference complex property to the segment seg.createComplexProperty('Material', 'Vinegar') #Do more stuff... #Save the new object system.mes.saveMESObject(seg) |
Python |
#Read all complex properties and print them #Read process segment MES object named Mix Dressing mesObject = system.mes.loadMESObject('Mix Dressing', 'ProcessSegment') #Get all available complex property types and cycle through them list = mesObject.getComplexPropertyTypeNames() for i in range(list.size()): complexPropType = list.get(i) #Get the number of entries for the current complex property type and cycle through them and print the name cnt = mesObject.getComplexPropertyCount(complexPropType) for j in range(cnt): complexProp = mesObject.getComplexProperty(complexPropType, j) print complexProp.getName() |
Object Functions
This object is not derived from the AbstractMESObject and therefore does not inherit its functions or properties.
Sepasoft MES Module Suite