Barcode Interleaved - Mod11 Check Digit 追蹤
Hello, guys
I've been searching a lot about this but i couldn't find any answer.
Our customer needs a barcode with 11 digits (interleaved symbology) + Mod11 Check Digit.
I know that it can be done with VBscript but i know nothing about this.
Explanning the code:
67 (only for control, not count for check digit)-90124568444-X (X= Mod11 check digit)
Examples:
67-90124568444-X
67-90124568445-X
67-90124568446-X
what code i have to use? i understand nothing about programmig.
Pleaaase! i need your help guys!
10 意見
BarTender supports a range of check digit functions in VB script, some of which are based on Mod 11, which is a very general, non-specific term. If one of these functions is right for you then you can use it in the below manner, which references the named data source value you set for the data part of the barcode.
ISO7064Mod11_10(Format.NamedSubStrings("barcode").Value)
BarTender supports a range of check digit functions in VB script, some of which are based on Mod 11, which is a very general, non-specific term. If one of these functions is right for you then you can use it in the below manner, which references the named data source value you set for the data part of the barcode.
ISO7064Mod11_10(Format.NamedSubStrings("barcode").Value)
Thanks for the fast answer!
i tried it but don't make the digit that the customer want.
They already have the software with formula to calculate the check digit but is for the inkjet printer and now they want to do it with a printer that uses Bartender .
Here is the code that the customer uses:
You just need to write the same code, but adapted to the VB script syntax.
VB Script uses a variant type for variables so the below dimension command example is all you need:
Dim numSoma
For each summed calculation something like the below should do it:
numSoma = numsoma + (Mid(numPedido,11, 1) * 2)
Of course if numPedidio is really just the value of a named data source then it could look like the below:
numSoma = numsoma + (Mid(Format.NamedSubStrings("barcode").Value,11, 1) * 2)
The last bit should be very similar:
You just need to write the same code, but adapted to the VB script syntax.
VB Script uses a variant type for variables so the below dimension command example is all you need:
Dim numSoma
For each summed calculation something like the below should do it:
numSoma = numsoma + (Mid(numPedido,11, 1) * 2)
Of course if numPedidio is really just the value of a named data source then it could look like the below:
numSoma = numsoma + (Mid(Format.NamedSubStrings("barcode").Value,11, 1) * 2)
The last bit should be very similar:
numResto = numSoma Mod 11value = IIf(numResto = 0 Or numResto = 1, 0, 11 - numResto)
Thanks a lot
Here is my code
DId you set this to be a multi-line or event based VB Script? The error indicates to me that it's set to a single line expression.
DId you set this to be a multi-line or event based VB Script? The error indicates to me that it's set to a single line expression.
thanks, its working without error but now the check digit is very big.
my barcode: 90122620215
check digit generated: 1179656
The check digit must to be only one digit.
Sorry for all this questions but i really know nothing about this
Okay, try this:
Dim numSoma, numResto numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,11, 1) * 2) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,10, 1) * 3) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,9, 1) * 4) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,8, 1) * 5) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,7, 1) * 6) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,6, 1) * 7) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,5, 1) * 8) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,4, 1) * 9) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,3, 1) * 10) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,2, 1) * 2) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,1, 1) * 3) numResto = numSoma Mod 11 value = IIf(numResto = 0 Or numResto = 1, 0, 11 - CInt(numResto))
Ooops, I named my data source btBarcode, so you want to change that back to "barcode" if that's what you're using in your document.
Okay, try this:
Dim numSoma, numResto numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,11, 1) * 2) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,10, 1) * 3) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,9, 1) * 4) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,8, 1) * 5) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,7, 1) * 6) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,6, 1) * 7) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,5, 1) * 8) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,4, 1) * 9) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,3, 1) * 10) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,2, 1) * 2) numSoma = numsoma + (Mid(Format.NamedSubStrings("btBarcode").Value,1, 1) * 3) numResto = numSoma Mod 11 value = IIf(numResto = 0 Or numResto = 1, 0, 11 - CInt(numResto))
You're very kind; I'll give my halo and extra polish today.
請登入寫評論。