AbstractMESComplexProperty
|
AbstractMESComplexProperty Functions
The AbstractMESComplexProperty object functions:
- addCustomProperty( name, dataTypeName, description, units, productionVisible, required, value)
- addCustomProperty(name, dataTypeName, description, units, productionVisible, required)
- addCustomProperty(propertyPath, name, dataTypeName, description, units, productionVisible, required)
- addCustomProperty(name, dataTypeName)
- addCustomProperty(propertyPath, name, dataTypeName)
- getAllCustomProperties()
- getBaseName()
- getName()
- getValue(valueName)
- logRenameChangeEvent(String oldName, String changeNote)
- setName(String name, String changeNote)
- setValue(valueName, value)
- Add New Prop
Characters Not Allowed in NamesThese characters are reserved by the Sepasoft modules. Production Equipment . ? ! # % ^ * ~ [ ] { } + = ` \ @ & ( ) < >,
MES Person
. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | < >
Other MES Objects
. ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | ,
Machine Recipe Name in Settings & Changeover Module
Follows the same convention as Other MES Objects Exception: Full-stop period . is allowed as of 3.81.10 SP2
Batch Names in Batch Procedure Module . ? ! # % ^ * ~ [ ] { } + = ` \/ " $ | ,
addCustomProperty(name, dataTypeName, description, units, productionVisible, required, value)You can add properties to any MES object and resource complex properties, such as material, equipment, personnel, etc. Use the methods below to add custom properties. Add a custom property directly to a MES object by not specifying a path to the parent property. To add a custom property as a child of an existing custom property or to a complex property, the parent path is used to specify the parent. Each level of the path is separated with a period. This allows for names to be duplicated provided the path is unique. For example, it is possible for a MES object to have custom properties "Dimension 1.Width" and "Dimension 2.Width" addCustomProperty(name, dataTypeName, description, units, productionVisible, required, value) String name - The name of the custom property to add. String dataTypeName - The name of the Ignition data type to make the new custom property. String description - The description of the custom property. String units - The units of the new custom property. This is just for reference. Boolean productionVisible - The default is false. If True, show the custom property in various components. If False, it will be hidden and can be used to store values behind the scenes. Boolean required - If True, a value must be assigned to the custom property before and segment is ended. String value - The value to assign to the custom property after it has been added. Nothing All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | obj = system.mes.loadMESObject('Box', 'MaterialDef')
obj.addCustomProperty('Type', 'String')
obj.addCustomProperty('Dimension', 'String', 'Dimension of box', '', True, False)
obj.addCustomProperty('Dimension', 'Width', 'Int4', 'Width of box', 'in', True, False, '24')
obj.addCustomProperty('Dimension', 'Height', 'Int4', 'Height of box', 'in', True, False, '12')
print obj.getPropertyValue('Type')
system.mes.saveMESObject(obj)
print obj.getPropertyValue('Dimension.Width')
print obj.getPropertyValue('Dimension.Height')
|
addCustomProperty(name, dataTypeName, description, units, productionVisible, required)Custom properties can be added to MES objects or even complex properties (such as a material, equipment or personnel reference) of an MES object. The Complex Property Functions method can be used to add a custom property directly to a MES object by not specifying a path to the parent property. To add a custom property as a child of an existing custom property or to a complex property, the parent path is used to specify the parent. Each level of the path is separated with a period. This allows for names to be duplicated provided the path is unique. For example, it is possible for a MES object to have custom properties "Dimension 1.Width" and "Dimension 2.Width" addCustomProperty(name, dataTypeName, description, units, productionVisible, required) String name - The name of the custom property to add. String dataTypeName - The name of the Ignition data type to make the new custom property. String description - The description of the custom property. String units - The units of the new custom property. This is just for reference. boolean productionVisible - The default is false. If True, show the custom property in various components. If False, it will be hidden and can be used to store values behind the scenes. boolean required - If True, a value must be assigned to the custom property before and segment is ended. Nothing All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | obj = system.mes.loadMESObject('Box', 'MaterialDef')
obj.addCustomProperty('Type', 'String')
obj.addCustomProperty('Dimension', 'String', 'Dimension of box', '', True, False)
obj.addCustomProperty('Dimension', 'Width', 'Int4', 'Width of box', 'in', True, False, '24')
obj.addCustomProperty('Dimension', 'Height', 'Int4', 'Height of box', 'in', True, False, '12')
print obj.getPropertyValue('Type')
system.mes.saveMESObject(obj)
print obj.getPropertyValue('Dimension.Width')
print obj.getPropertyValue('Dimension.Height')
|
addCustomProperty(propertyPath, name, dataTypeName, description, units, productionVisible, required)Custom properties can be added to MES objects or even complex properties (such as a material, equipment or personnel reference) of an MES object. The Complex Property Functions method can be used to add a custom property directly to a MES object by not specifying a path to the parent property. To add a custom property as a child of an existing custom property or to a complex property, the property path is used to specify the property. Each level of the path is separated with a period. This allows for names to be duplicated provided the path is unique. For example, it is possible for a MES object to have custom properties "Dimension 1.Width" and "Dimension 2.Width" addCustomProperty(propertyPath, name, dataTypeName, description, units, productionVisible, required) String propertyPath - The name or property path of the custom property. String name - The name of the custom property to add. String dataTypeName - The name of the Ignition data type to make the new custom property. String description - The description of the custom property. String units - The units of the new custom property. This is just for reference. Boolean productionVisible - The default is false. If True, show the custom property in various components. If False, it will be hidden and can be used to store values behind the scenes. Boolean required - If True, a value must be assigned to the custom property before and segment is ended. Nothing All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | obj = system.mes.loadMESObject('Box', 'MaterialDef')
obj.addCustomProperty('Type', 'String')
obj.addCustomProperty('Dimension', 'String', 'Dimension of box', '', True, False)
obj.addCustomProperty('Kind', 'Dimension', 'String', 'Dimension of box', '', True, False)
obj.addCustomProperty('Dimension', 'Width', 'Int4', 'Width of box', 'in', True, False, '24')
obj.addCustomProperty('Dimension', 'Height', 'Int4', 'Height of box', 'in', True, False, '12')
print obj.getPropertyValue('Type')
system.mes.saveMESObject(obj)
print obj.getPropertyValue('Dimension.Width')
print obj.getPropertyValue('Dimension.Height')
|
addCustomProperty(name, dataTypeName)Custom properties can be added to MES objects or even complex properties (such as a material, equipment or personnel reference) of an MES object. The Complex Property Functions method can be used to add a custom property directly to a MES object by not specifying a path to the parent property. To add a custom property as a child of an existing custom property or to a complex property, the property path is used to specify the property. Each level of the path is separated with a period. This allows for names to be duplicated provided the path is unique. For example, it is possible for a MES object to have custom properties "Dimension 1.Width" and "Dimension 2.Width" addCustomProperty(name, dataTypeName) String name - The name of the custom property to add. String dataTypeName - The name of the Ignition data type to make the new custom property. Nothing All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | obj = system.mes.loadMESObject('Box', 'MaterialDef')
obj.addCustomProperty('Type', 'String')
obj.addCustomProperty('Dimension', 'String', 'Dimension of box', '', True, False)
obj.addCustomProperty('Dimension', 'Width', 'Int4', 'Width of box', 'in', True, False, '24')
obj.addCustomProperty('Dimension', 'Height', 'Int4', 'Height of box', 'in', True, False, '12')
print obj.getPropertyValue('Type')
system.mes.saveMESObject(obj)
print obj.getPropertyValue('Dimension.Width')
print obj.getPropertyValue('Dimension.Height')
|
addCustomProperty(propertyPath, name, dataTypeName)Custom properties can be added to MES objects or even complex properties (such as a material, equipment or personnel reference) of an MES object. The Complex Property Functions method can be used to add a custom property directly to a MES object by not specifying a path to the parent property. To add a custom property as a child of an existing custom property or to a complex property, the property path is used to specify the property. Each level of the path is separated with a period. This allows for names to be duplicated provided the path is unique. For example, it is possible for a MES object to have custom properties "Dimension 1.Width" and "Dimension 2.Width" addCustomProperty(propertyPath, name, dataTypeName) String propertyPath - The name or property path of the custom property. String name - The name of the custom property to add. String dataTypeName - The name of the Ignition data type to make the new custom property. Nothing All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | obj = system.mes.loadMESObject('Box', 'MaterialDef')
obj.addCustomProperty('Type', 'String')
obj.addCustomProperty('Kind', 'Type', 'String')
obj.addCustomProperty('Dimension', 'String', 'Dimension of box', '', True, False)
obj.addCustomProperty('Dimension', 'Width', 'Int4', 'Width of box', 'in', True, False, '24')
obj.addCustomProperty('Dimension', 'Height', 'Int4', 'Height of box', 'in', True, False, '12')
print obj.getPropertyValue('Type')
system.mes.saveMESObject(obj)
print obj.getPropertyValue('Dimension.Width')
print obj.getPropertyValue('Dimension.Height')
|
getAllCustomProperties()Returns all the custom properties. getAllCustomProperties() None List<MESCustomProperty> - The list of custom properties. All 1 2 | matDef = system.mes.loadMESObject('Cane Sugar', 'MaterialDef')
matDef.getAllCustomProperties()
|
getBaseName()Complex properties that use extended naming have an associated base name and a number following it. This is used with Lot Reference Property that the Response Segment uses. Each time a lot reference is created it is named the base name with an extension added to it. For example: If balsamic vinegar is being unloaded and the tank it is being stored in fills up before the truck is fully unloaded. When it is switched to another storage tank a new lot reference is created. If the name of the material reference in the Process Segment is named Vinegar, then the first lot reference is named Vinegar-1 for the first storage tank and the second is Vinegar-2 for the second storage tank. Get the base name for the complex property. getBaseName() None String baseName - The base name for the complex property. All 1 2 3 4 5 | seg = system.mes.createMESObject('ProcessSegment')
materialProp = seg.createComplexProperty('Material', 'Vinegar')
print materialProp.getBaseName()
|
getName()Complex properties that use extended naming have an associated base name and a number following it. This is used with Lot Reference Property that the Response Segment uses. Each time a lot reference is created it is named the base name with an extension added to it. For example: If balsamic vinegar is being unloaded and the tank it is being stored in fills up before the truck is fully unloaded. When it is switched to another storage tank a new lot reference is created. If the name of the material reference in the Process Segment is named Vinegar, then the first lot reference is named Vinegar-1 for the first storage tank and the second is Vinegar-2 for the second storage tank. Get the name for the complex property. getName() None String - The name for the complex property. All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | seg = system.mes.createSegment('Receive Steel', '\\Enterprise\Site\Area\Unload Station 1', True)
seg.setMaterial('Steel In', '84000', '\\Enterprise\Site\Receiving\Steel\QC Holding', 'Lot 84000-1', 100.0)
cnt = seg.getComplexPropertyCount('ResponseMaterial')
for ndx in range(0, cnt):
prop = seg.getComplexProperty('ResponseMaterial', ndx)
print prop.getName()
seg.begin()
seg = system.mes.getActiveSegment('Enterprise\Site\Area\Unload Station 1', 'Receive Steel')
seg.setMaterial('Steel In', '84001', '\\Enterprise\Site\Receiving\Steel\QC Holding', 'Lot 84001-1', 100.0)
seg.update()
seg = system.mes.getActiveSegment('Enterprise\Site\Area\Unload Station 1', 'Receive Steel')
cnt = seg.getComplexPropertyCount('ResponseMaterial')
for ndx in range(0, cnt):
prop = seg.getComplexProperty('ResponseMaterial', ndx)
print prop.getName()
|
Get the parent property for this complex property. getParentProperty(propertyName) String propertyName - The name of complex property to return the parent property for. AbstractMESProperty - The parent property of the specified complex property. All 1 2 | matDef = system.mes.loadMESObject('Cane Sugar', 'MaterialDef')
matDef.getParentProperty('Width')
|
getValue(valueName)Returns the value for the specific property. getValue(valueName) String valueName - The name of the value to return. String - The value as an object, or returns null if the property is not found (does not throw an error). All 1 2 3 4 5 | seg = system.mes.createMESObject('ProcessSegment')
materialProp = seg.createComplexProperty('Material', 'Vinegar')
print materialProp.getValue('MaterialProductionSelectable')
|
logRenameChangeEvent(String oldName, String changeNote)The 'changeNote' allows you to attach any arbitrary message to the change so that it appears in the Change Log table. logRenameChangeEvent(String oldName, String changeNote) String oldName String changeNote All setName(String name, String changeNote)Attaches any arbitrary message to the change so that it appears in the Change Log table. setName(String name, String changeNote) String String name - The 'changeNote' allows you to attach any arbitrary message to the change so that it appears in the Change Log table. nothing All setValue(valueName, value)Set the value for the specified value name. setValue(valueName, value) String valueName - The name of the value to set. String value - The new value. boolean - True if the property has been set successfully and False otherwise (does not thrown an error if property does not exist or is of a different type). All 1 2 3 4 5 6 7 8 9 10 11 | seg = system.mes.createMESObject('ProcessSegment')
materialProp = seg.createComplexProperty('Material', 'Vinegar')
materialProp.setValue('MaterialRatePeriod', 'Sec')
materialProp.setValue('MaterialRate', '74')
print materialProp.getValue('MaterialRatePeriod')
system.mes.saveMESObject(seg)
|
|