Barcode Field Length? Seguir

0
Avatar
Legacy Poster

Please pardon a newbie question but, after searching the forums and not finding an answer, I figured a post was in order.

I am using a code-39 bar code with a prompt for input on the data field (for customer purchase order number) on a 4"(w) x 6"(h) product label.
Depending on the PO number entered, this bar code field can grow beyond the edge of the label.
While this is not a major issue for me as designer of the label, because I can just drag to adjust the field size, it becomes a major issue for those users who can only print the label via Print Station.

Can someone help explain how I can set a limit on the width of the field so the bar code will never run off the label regardless of how long the PO number entered may be?

Thank you in advance!

5 comentarios

0
Avatar
Fernando Ramos Miracle
Moderador
Acciones de comentarios Permalink

The width of a barcode will always depend on the quantity of information you enter. I can think of mainly two ways of limiting the size of the barcode:

1. On one hand you could directly limit how much information a user can enter in the prompt (let me know what BarTender version and edition you are working with for further help).

2. Although a bit more complicated, you could also control this through a VB Script. Basically you would need to put several barcodes one on top of the other, each of theam with a different density and all sourcing from the same prompt input; once done that, use a VB Script to only show one of them, depending on the length of the information entered.
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

Fernando, thank you for your reply.
I am using Enterprise Automation version 9.4 SR3 Build 2781.

For number 1 - I have thought of limiting the number of characters that could be entered in that field via the MAXIMUM tab under 'More data source options'. Was this your thought?
The problem is that the PO numbers in question, are those of our customers and I have no control over how long they might be.

You lost me on number 2. How could I accomplish something like what you describe?

~ G
0
Avatar
Fernando Ramos Miracle
Moderador
Acciones de comentarios Permalink

[quote name='Gene' timestamp='1354198532' post='3819']
Fernando, thank you for your reply.
I am using Enterprise Automation version 9.4 SR3 Build 2781.

For number 1 - I have thought of limiting the number of characters that could be entered in that field via the MAXIMUM tab under 'More data source options'. Was this your thought?
The problem is that the PO numbers in question, are those of our customers and I have no control over how long they might be.

You lost me on number 2. How could I accomplish something like what you describe?

~ G
[/quote]


I’ve created an example we created some time ago illustrating the second option and attached it to this message.

1. In my example I used a text object related to a prompt as the input to evaluate later on the barcodes .

It is necessary to name this object in order to refer to it later from the VB script. To do this double click on the text object, go to the “Data Source” tab and then to the “Share/Name” tab; on this tab you will be able to name the substring (in my example it’s called “Input”).

2. To edit and mark a barcode with VB script double click on the barcode and under the “Data Source” tab select the “Visual Basic Script” source, make sure that it’s a Multi-Line Script and click on Edit…

This will open the “Script Assistant” on which you will need to enter the VB script.

The basic structure of the code will be:

[i]If Len(Object to evaluate) =|>|< input Then
Value = (Object to evaluate)
Else
Value = “”
End If[/i]

On the script assistant you will see a tree menu, there you can select Shared Sub Strings if you want to refer to another object (like in my example) or Database Fields if you prefer referring to a database (double click on the field or on the substring will insert it on the script assistant).

On each of the three barcodes I’ve implemented a range of length values on which they will be visible, if you know exactly what possible lengths your database values can take , you could implement one barcode for each length value with the proper density and position.

The VB script I’ve used is the following:

a. I you need to specify a length [u]range[/u] like in my example(In the first case under 6 characters and in the second between 6 and 10):

[i]If Len(Format.NamedSubStrings("Input").Value) < 6 Then
Value = Format.NamedSubStrings("Input").Value
Else
Value = ""
End If[/i]

Or

[i]If Len(Format.NamedSubStrings("Input").Value) > 5 And Len(Format.NamedSubStrings("Input").Value) < 11 Then
Value = Format.NamedSubStrings("Input").Value
Else
Value = ""
End If[/i]

b. If you need an exact value for each length input:

[i]If Len(Format.NamedSubStrings("Input").Value) = 6 Then
Value = Format.NamedSubStrings("Input").Value
Else
Value = ""
End If[/i]
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

Fernando, thank you.
I"ll give this a try (I'll try to do it today) and post back.

~ G
0
Avatar
Legacy Poster
Acciones de comentarios Permalink

Fernando,
This should work perfectly once I add a couple more overlays.
Thank you!!

~ G

Iniciar sesión para dejar un comentario.