system.kanoa.attribute.addAttributeAssetLink(attrAssetInfo, userId)
Adds a new attributeAssetLink
Parameters
attrAssetInfo Dictionary
| - assetId | Integer | |
| - attributeId | Integer | |
| - enabled | Boolean | |
| - ignoreZeroValues | Boolean | If true, zero values coming from a tag are ignored |
| - scaleFactor | Integer | Scaling factor to be applied to the value pulled from a tag |
| - sourceTagPath | String | tagPath if value is to be pulled from a tag |
userId Integer
Returns
attributeAssetLinkId Integer
msg String None if success
Example
attrAssetInfo = {
'attributeId': 3,
'assetId': 5,
'sourceTagPath': '[Kanoa]Kanoa Box Co/Box Plant/Packaging/Box Line 1/QDS/Compressor1/hoa',
'scaleFactor': 1.0,
'ignoreZeroValues': True,
'enabled': True
}
userId = 123
attributeAssetLinkId, msg = system.kanoa.attribute.addAttributeAssetLink(attrAssetInfo, userId)