Saltar al contenido principal

Búsqueda

Búsqueda

How To Calculate This

Comentarios

9 comentarios

  • Avatar
    Fernando Ramos Miracle

    Hello Justine,

     

    The predefined function you need (if you wish to use our VB Script) is the one called UccMod10. I've tested your value with a Code 128 barcode and certainly gives me 9.

     

    Regards.

    0
  • Avatar
    Legacy Poster

    Hi,

     

    May i know how did u calculate it?

    Cause i tried using UccMod10 but it gives me 4 as the check digit.

    0
  • Avatar
    Fernando Ramos Miracle

    Hello Justine,

     

    I've attached a sample document for you to see (saved with v10.1).

     

    I basically generated a barcode object with two data sources, the first one contains the string of data and the second one contains the VB Script with the check digit function.

     

    I then named the first data source, and used that name to reference it in the VB Script.

     

    Please take a look at the attached file and let me know if you get the desired result.

     

    Regards.

    0
  • Avatar
    Legacy Poster

    Hi ,

     

    Thx it works!!!

     

    By the way , what does this statement does "Format.NamedSubStrings"

     

    can i be done just only like this ? UccMod10(data)?

    0
  • Avatar
    Fernando Ramos Miracle

    Hello Justine,

     

    In older versions of BarTender it could certainly be done, but in later ones you'll need to use the full path.

     

    Please note that you can add a reference to a data source using the link in the "Category" menu from the VB Script assistant dialog.

     

     

    Regards.

    0
  • Avatar
    Legacy Poster

    Hmm..funny thing is i am using the latest version of BT. V10.1

    and it can be done by using this method UccMod10(data)  :unsure: 

    0
  • Avatar
    Fernando Ramos Miracle

    Hello Justine,

     

    Even if it's accepted (you won't get an error most of the time) it's still legacy from older versions, and as you can testify it's not that reliable.

     

    Whenever possible please use the full path to reference data from other data sources.

     

    Regards

    0
  • Avatar
    Allan Sanchez

    Hi,

    Can you also share the btw file to me as well for I am having the same problem computing the Code 128 Check digit.

     

    0
  • Avatar
    Peter Thane

    This may help:

    Give the barcode substring a name (I used "TheCode" in the images below)

    Next add a new substring to the barcode and set that to a VB script type. Depending on where the data from your barcode comes from, such as if from a Data Entry form entry or a Database, then you may need to set the type of VB to an Event Controlled Script and add the VB command to the appropriate section (eg OnNewRecord for databased input). 

    For mine I have used a Multi-line script and once you have selected the type click on the Edit button to add the script.

     

    Amend the data in the code box to Value = and then open up the Functions>Check Digit option from the toolbox on the right and choose the type of CD calculation you require (I chose UCCMod10) 

    For the string, again from the Toolbox on the right open up Named Data Sources and select the Name you chose above. Make sure that the Format,NamedSub.....Value is within the brackets after the UCCMod10 command (you will probably need to delete the close bracket that appears after the MCCMod10( and add it back in after the .Value.

    Hopefully that will get you up and running

     

     

     

     

     

    0

Iniciar sesión para dejar un comentario.