Incrementing after print 追蹤

0
Avatar
Philip Richardson

Hi everyone

I have 3 numbers on a label each one increments by 1 per label

eg

1, 501, 1001,

2, 502, 1002,

3, 503, 1003,

when I print 500 labels is there a way to then get the next set of numbers to jump to the next number in the sequence

1501, 2001, 2501

1502, 2002, 2502

1503, 2003, 2502

At the moment I have the 2nd and 3rd numbers reading the 1st and then adding the print qty (print qty x 2 for the 3rd number)

I have tried on print job end

Format.NamedSubStrings("SNoBox").Value + (Format.NumberSerializedLabels *3) 

"SNoBox" being where I enter my 1st number but when i test this it just returns 1500 (3 x print qty)

Using v10.4

11 意見

0
Avatar
Adam Flores Sr
評論操作 永久連結

Here's a sample of what I understand you might need,

Looks like you start with 1, Then add 500 to the second field and 1000 to the third field. so I created field 1 and Named it: Serial_1, then I created the second and third fields and I used the Transforms Tab of each of those fields

and use a simple vbScript on each of the second and third fields

For the 2nd Field: Value = Format.NamedSubStrings("Serial_1").Value + 500

For the 3rd Field: Value = Value = Format.NamedSubStrings("Serial_1").Value + 1000

Then in Transforms Tab: Select Serialization: and increment x 1

all three fields.

bar Tender will always keep the last Serial Number so when you print more

it will pick up from where it left off in the previous print.

If you need to reset the Serial numbers at some point, only change the Field 1.

I hope this is what you are looking for.

Regards.

Adam Flores Sr.

0
Avatar
Philip Richardson
評論操作 永久連結

Hi Adam,

This is pretty much what I have set up at the moment, the problem is the next time I print, the 1st field will then start at 501, what i really need is for it to automatically advance to 1501, 3001, 4501 etc.. . I am currently having to manually enter the correct start number each time I print (the actual numbers I am working with is an 8 digit number linked to a code 128 barcode and I cant have any repetition in the numbering sequence)

0
Avatar
Pete Thane
評論操作 永久連結

You may need to use VB to at the end of the print run write out the value of your 3rd field to a text file and at the start of the print run you read in this value as your starting number for 1st (lowest serial number field) 

0
Avatar
Adam Flores Sr
評論操作 永久連結

Hello Philip,

Sorry I still don't understand your serialization scheme, 

in the example you start your first serial with 1, the second with 500 and the third with 1000

so your sample starts as follows"

1

2

3

so after printing 500 labels your next sequence should be 501 but you are jumping to 1501.

at what point or condition you add the extra 1000 to your sequence.

and will the second serial number plus 500 and the third number be plus 1000?

Would you be able to attach a sample pdf file with the sequencing logic?

Like Peter said you might need to write a vbScript 

It looks like you want to use the Value of the last serial number of your third field as the Value of the

First field in your next Run. (which at this point I got lost on the sequence you are trying to achieve)

Regards,

Adam Flores.

0
Avatar
Philip Richardson
評論操作 永久連結

Hi Adam & Pete

Sorry maybe I should explain the workflow fully

All 3 numbers (1, 501, 1001) are on 1 "label" in bartender

I then print 500 "labels" (amount can vary depending on the job) to a pdf file

This pdf file is then sent to our digital press (Mark Andy Digital One) where the file is printed, die cut into 3 labels across the web and slit into 3 individual rolls of 500 labels (the amount of labels across the print web can also vary), We normally print the pdf's in bulk (20 sets of 500 "labels"), these are then wound back down into rolls of 500.

The job that these were for was for 825 rolls of 500 labels, 825 rolls ÷ 3 labels across the web = 275 pdf's, as you can probably guess manually updating the number each time I need to generate a pdf gets a bit tedious (luckily i only need to update the first number as the other 2 numbers read from that and adjust accordingly)

Because bartenders print order works on a page by page basis I cant just set up the page to be 3 columns across and set the print order top to bottom, hence the 3 separate numbers on the label

0
Avatar
Pete Thane
評論操作 永久連結

Cant you just setup the label like this?

 

 

0
Avatar
Philip Richardson
評論操作 永久連結

Pete
No because this only works on a page by page basis and in my 500 label roll example I generate an 84 page pdf. (3 x 6 labels per page with a couple of blanks on the last page)
Adam
You were almost correct when you said
"It looks like you want to use the Value of the last serial number of your third field as the Value of the First field in your next Run."
I actually need the value of the last serial number of the 3rd field +1 (to avoid repetition)

0
Avatar
Pete Thane
評論操作 永久連結

Yes, you're right sorry. How about this:

The 001, 002 and 003 fields all have their Transforms settings configured the same, as per the image below, ie min 3 characters, pad left with 0 with no warning and Increment by 1 each label, however the 002 and 003 fields are VB scripted.

 

The Start number Data Entry field is linked to the 001 field on the Template and I have also made this a Named Data Source (via the Change Data Source Name button on the Data Source tab) and have called it NumUp

The 201 field is another Named data Source, EndNo, and is linked to the End Number data entry field. 

The NoLabs field is a Named data Source called NoLabs and is set as an EventControlled>OnPostPrompt VB Script object that calculates the number of labels (pages) required to print rounding up. This calculates the value from EndNo data entry field figure added by the user at print time, The script for this is

Value = Format.NamedSubStrings("EndNo").Value

Value = Value/3

Value = Round(Value,1)

Value1 = Value * 10

Value1 = Right(Value1,1)

If Value1 = 0 then

Value = Value

else Value = Value + 1

end if

Value = Round(Value,0)

 

On the File>Print screen you also need to link the number of Serial Numbers entry box to this field via the use of the two highlighted buttons:

 

The 002 field is another Event Controlled VB script routine but this time set to trigger OnSerialise and the script for this is 

Value = Format.NamedSubStrings("NoLabs").Value

Value1 = Format.NamedSubStrings("NumUp").Value

Value = CInt(Value) + Value1

NOTE: with this and the 003 field you will get an error about the CInt command when you close the edit screen but juts ignore this. This occurs as the words Value and Value1 are not fully numeric but the data will be when the routine is activated.

The 003 field is configured the same as the 002 but includes some extra lines of script (to make sure the end number is not being exceeded and if is XXX prints instead) plus mutlplies the NoLabs value

If Value > Format.NamedSubStrings("EndNo").Value then
Value = "XXX"

else Value = Format.NamedSubStrings("NoLabs").Value * 2
Value1 = Format.NamedSubStrings("NumUp").Value
Value = CInt(Value) + Value1

end if

Value = Value

 

Hopefully this will get you up and running meaning you only have to enter the start and end number of each batch when you print.

Pete

 

 

 

 

 

0
Avatar
Philip Richardson
評論操作 永久連結

Hi Pete
Thanks for that, sadly that only achieves what I've got at the moment, (I'm off this week so am only posting from memory). At the moment I have a data entry box for my start number which I need to manually update each time I print, the 1st 2nd and 3rd fields all use VB script to read this data entry number then
1st field uses as is,
2nd field adds the value of sequential_numbers 3rd field adds the value of sequential_numbers x 2.
I have tried using the OnPrintJobEnd document VB script just don't think I've got the to read the value and add the value of sequential_numbers x 3, but I don't think I've got the right values as it is just returning a value of 1500 (500 sequential numbers x 3) instead of adding this number to the saved number in the data entry box. When I am back at work next week I will upload my bartender file.
Thanks for all the suggestions so far

0
Avatar
Adam Flores Sr
評論操作 永久連結

Hello Philip Richardson,

Pete Thane, uploaded a sample layout in which the printing order starts from the

Top-Left corner and it it prints the serial numbers vertically up to the page limit

of the Bottom-Corner, then it continues the sequence in the second column Top-row, then to the third Column Top-row all the way down to the bottom right corner.

I created a Bar Tender format with a page size of 8.50" x 128.00"

which it is maximum page length of a PDF document.

the I set up 1 label format with 120 rows x 3 columns.

label size 3.00" x 2.00".

added a text Field with a Serial number starting at 1 (3 characters min padded with zeros)

set to serialize in 1 increments.

This way Bar Tender keeps the last Serial number in the format, and the next time you print it will start from the last number+1 serial number

so when you print you can print in 120 increments and that will fill up all the pages, No VB script, no special handling.

Just find out you digital printer's page specifications

then you can adjust the page size to the max page-width and max page-length

Hopefully this gives your the solution you are looking for.

if you send me your email I can send you the Bar Tender format

and a couple PDF printouts I made to make sure it works.

I don't know how to attach the files to this thread

Regards,

Adam Flores Sr.

 

0
Avatar
Pete Thane
評論操作 永久連結

This is some code from a Vb script routine created for a label a long time ago. 

This is an OnPrintStart VB routine that looks for a file (Odds.txt) and if it is not there creates it but if it is there Reads the value in the file.

Dim fs, file, fso, makedatafile, f

If IsNumeric(Value) = False Then
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.FileExists("c:\program files\bartender\odds.txt")
if f = False then
Set makedatafile = fs.CreateTextFile("c:\program files\bartender\odds.txt", False)
Set file = fs.OpenTextFile("c:\program files\bartender\odds.txt")
makedatafile.writeline "1"
Else
Set file = fs.OpenTextFile("c:\program files\bartender\odds.txt")
Value = file.ReadLine
End If
Value = file.ReadLine
End if
Value = Value

This is an at EndPrint routine that writes the value out to the Odds.Txt file

If Value <> "" then
Dim fs, a
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\program files\bartender\odds.txt", True)
a.WriteLine(Value)
a.Close

End if

Not tried it but you could try adding the reading code into the start number box and the read out for the data field in column 3. There maybe a problem maybe however when the XXX value triggers but if you know what the end number is going to be you could be and entered it in the Data Entry Form then then you code add the write command link to this field on the label instead. 

登入寫評論。