Type mismatch error when using Bartender integration Builder フォローする
I have created an script to set the X position of a text in a label.
The position is calculated in every new record based on the value of a text file (converted to columns through data connection).
The script has only one line and it works perfectly when I only use bartender to print the label in a industrial printer or when preview in bartender. However I get an error of "Type mismatch" when I automate the printing with BarTender Automation Builder.
The most difficult part for me to understand is that I get the type mismatch error on a column that is not being used in the script at all.
The script is in "OnNewRecord" event in BarTender Document Options. This is the script:
Format.Objects("X").X = 74 - 6.5 * Field("identificacionLinea.identificacionLinea.cant_maq",1) + 13 * (Field("identificacionLinea.identificacionLinea.posicion",1) - 1)
The error in the Integration Builder is : "OnNewRecord (Line 1): Type Mismatch: [string: 'modelo']" where "modelo" is the first column in the text file that contains the data.
I'm using BarTender Designer 2016 R5 and BarTender Automation Builder 2016 R5 version 22.214.171.12412 (64 bits).
Why is Bartender Automation Builder giving an error when I can use the script in BarTender Designer with no errors?
Why is Bartender Automation Builder giving an error with column 'modelo' if I am not using it in the script?
Do you have any idea about how to fix this or a different way to set the position of an object dinamically?