Difference between named data source value and object value?
Hello!
I have made a simple label with a Data Matrix (DM) and a serial number.
When the label was first made, a "Named Data Source" was not used for the DM, but it was coded with the object's "Value" (Format.Objects("SN").Value).
When this label was printed, the readable S/N on each label was updated, but not the DM, it was identical on each label printed.
For this label to work I have to go to Print -> Performance and uncheck "Allow serialization".
(Left labels DM is not updating, "Allow serialization" ticked.)
(Right labels DM is updating, "Allow serialization" unticked.)
If I instead choose to make a "Named Data Source" (Format.NamedSubStrings("SN").Value) and use it for the DM, it works regardless of whether "Allow serialization" is ticked or not.
(Named Data Sources, "Allow serialization" ticked or unticked does not matter)
My question is if this is a feature or a bug? :-)
Why is the DM not updating when using Object Value?
This is printed on a Brady IP300 with BarTender 2022 R5.
BR
Joakim
-
Peter Thane
★ BarTender Hero ★
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 -
Joakim Värnberg
★ BarTender Hero ★
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
Joakim0 -
Peter Thane
★ BarTender Hero ★
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 -
Joakim Värnberg
★ BarTender Hero ★
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
Joakim0 -
Peter Thane
★ BarTender Hero ★
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 -
Joakim Värnberg
★ BarTender Hero ★
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
Joakim0 -
Peter Thane
★ BarTender Hero ★
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.
Kommentare
7 Kommentare