Zum Hauptinhalt gehen

Suche

Suche

Difference between named data source value and object value?

Kommentare

7 Kommentare

  • Avatar
    Peter Thane

    The Single Line VB is only being applied once to the label. You need to make this an Event Controlled Script > OnSerialise so that it runs every time a new serial number is generated.

    You will need to amend the VB to include Value = prefix to your code 

    0
  • Avatar
    Joakim Värnberg

    Thanks for your reply.

    But if Single Line VB only was applied once, why would using "Named Data Sources" (Format.NamedSubStrings("SN").Value) work?
    It is still using Single Line VB...

    I can't find any reference in the help that Single Line VB only is applied once to a label,  under "Event Control Scripts" it says that BarTender tries to determine the frequency of a Single or Multi Line VB script.

     

    BR
    Joakim

    0
  • Avatar
    Peter Thane

    That is my understanding of how it works but if you use the Event Controlled Script you are controlling the VB to run at a particular time during the printing process. 

    It looks like BarTender was creating the DataMatrix and sending the code down to the printer as a static object. I have seen this before where you have transforms etc involved. Different elements get processed at different times during the printing as I am not sure in what order they are applied using an Event Controlled Script guarantees when the this runs. 

    With serialisation, if BarTender has access to the printers commands and languages then data sent to the printer would have a command something like start at 1 and add 1 every 1 label in it for the text and barcode fields (assuming using resident fonts). The unticking the Allow Serialisation tickbox means this is then disabled and BarTender will be sending down a command for each label, which is why that would work.  

    0
  • Avatar
    Joakim Värnberg

    That is my understanding of how it works but if you use the Event Controlled Script you are controlling the VB to run at a particular time during the printing process. 

    I'm not saying you are wrong, but it sems very odd to me that a simple label like this, with a Data Matrix that get its data from another object, would require you to dig pretty deep into the inners of BarTender (even the help file says that Event Control Scripts are among the most advanced features of BarTender)

    With serialisation, if BarTender has access to the printers commands and languages then data sent to the printer would have a command something like start at 1 and add 1 every 1 label in it for the text and barcode fields (assuming using resident fonts). The unticking the Allow Serialisation tickbox means this is then disabled and BarTender will be sending down a command for each label, which is why that would work.

    Yes, I have no problem to "untick" allow serialization, but the original question remains, why would there be a difference between using a named data source and an objects value directly?
    Format.Objects("SN").Value vs. Format.NamedSubStrings("SN").Value.

    The Brady IP300 is starting to be pretty old by now (latest FW is from 2017), maybe it is some kind of driver or printer issue?
    I have not had a chance to try this on another printer yet.

    BR
    Joakim

    0
  • Avatar
    Peter Thane

    As I mentioned above different elements of the label are processed at different times and it looks like the name is being shared by the VB prior to the serialisation being run. Have you tried linking the fields by the full shared name route? 

     

    Or else via the Object Value method? You will need the Text field name/number for this though

     

     

     

    0
  • Avatar
    Joakim Värnberg

    Thank you Peter,

    Using "Object Value" does work (with allow serialization still ticked), I had honestly not noticed that this was an alternative in the Type options.
    I also learned today that if you add more Data Sources to an object, they will automaticly concatonate (to a barcode for example)

    Coming from Codesoft, still learning BarTender :-)



    BR
    Joakim

    0
  • Avatar
    Peter Thane

    No worries. If you are using GS1 barcodes then there is an Application Identifier Wizard that guides you through the process of making such a symbol and will concatenate all the fields for you whilst for none GS1 you have to add the substrings yourself.

    What is sometimes useful for concatenated text objects is that, on the template view, you can highlight part of the field and adjust the font size/type etc of just that part to make it more pronounced etc. such as

    You could just add these as separate fields and maybe Group them together anyway but if not then this can be useful. 

     

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.