That looks nice, however, I am not planning to display the 128 barcode on part or assembly. I want it available inside our PDM database
It's just a font you must comply with the international STD for 128Code Bar only. And at the data level as in Excell you should concatenate data to be shown in the registry and replace it with the source you need.
Have you tried yet?
A barcode note in general, not just in SW:
We implemented bar coding for a particular client's products and found that you just can't "print" a bar code font.
There's actually some encoding going to make the data actually be scanned.
So test print and test scan.
We can print Barcode 39 or 3of9 as this character set is just 39 characters. Numbers and capital letters only, no special characters.
Barcode 128 is a full character set that includes compression to reduce the physical length of the bar code strip.
This compression requires coding, a macro, and a means to trigger the execution.
do you use some kind of barcode font?
Public Function code128$(propertyValue$) Dim i%, checksum&, mini%, dummy%, tableB As Boolean code128$ = "" If Len(propertyValue$) > 0 Then For i% = 1 To Len(propertyValue$) Select Case Asc(Mid$(propertyValue$, i%, 1)) Case 32 To 126, 203 Case Else i% = 0 Exit For End Select Next code128$ = "" tableB = True If i% > 0 Then i% = 1 Do While i% <= Len(propertyValue$) If tableB Then mini% = IIf(i% = 1 Or i% + 3 = Len(propertyValue$), 4, 6) GoSub testnum If mini% < 0 Then If i% = 1 Then code128$ = Chr$(210) Else code128$ = code128$ & Chr$(204) End If tableB = False Else If i% = 1 Then code128$ = Chr$(209) End If End If If Not tableB Then mini% = 2 GoSub testnum If mini% < 0 Then dummy% = Val(Mid$(propertyValue$, i%, 2)) dummy% = IIf(dummy% < 95, dummy% + 32, dummy% + 105) code128$ = code128$ & Chr$(dummy%) i% = i% + 2 Else code128$ = code128$ & Chr$(205) tableB = True End If End If If tableB Then code128$ = code128$ & Mid$(propertyValue$, i%, 1) i% = i% + 1 End If Loop For i% = 1 To Len(code128$) dummy% = Asc(Mid$(code128$, i%, 1)) dummy% = IIf(dummy% < 127, dummy% - 32, dummy% - 105) If i% = 1 Then checksum& = dummy% checksum& = (checksum& + (i% - 1) * dummy%) Mod 103 Next checksum& = IIf(checksum& < 95, checksum& + 32, checksum& + 105) code128$ = code128$ & Chr$(checksum&) & Chr$(211) End If End If Exit Function testnum: mini% = mini% - 1 If i% + mini% <= Len(propertyValue$) Then Do While mini% >= 0 If Asc(Mid$(propertyValue$, i% + mini%, 1)) < 48 Or Asc(Mid$(propertyValue$, i% + mini%, 1)) > 57 Then Exit Do mini% = mini% - 1 Loop End If Return End Function
Yes we do use a barcode font. It is called "Bars and Spaces"
We got this font file from a programmer that is helping us place the codes on our drawings.
A macro is used to process some of this work and a macro requires a trigger. A rebuild command is one way to trigger the macro.
Not a huge deal, but a user can make a drawing, save and close without doing a rebuild. so the barcodes display out of date data.
So, I would like to move the macro upstream to the part and assembly file (templates) so this barcode is available earlier for other purposes(Not sure what shop floor automation those purposes are yet) and to be more confidant that the macro has run to display current data.
Again, We have this working pretty much as we need it. I am looking for other ideas and methods that have been used by others.
Thanks for reading
Why you use a macro?
a requiriment of Ford is
- 1. The barcode (itself) is to be printed on a white background
- 2. The barcode symbology is to be code 39 or code 128.
- 3. The barcode must not to contain any special characters, spaces or dashes. The content
Of the barcode can eliminate the ford base number and use the model and suffix. Ab39 19b548 aa
Needs to be written in full format but on the barcode the format can be ab39 aa to increase
The spacing between the barcode lines to allow easier reading
- 4. Quiet zones are required before the start and at the end of the barcode; quiet zones are
The area immediately preceding the start character and following the stop character that
Contains no markings. The size of each quiet zone is to be a minimum of ten times the narrowest
Bar in the barcode.
- 5. The barcode label material is to be low sheen or non-gloss and have a permanent adhesive backing.
- 6. The label must not be able to be smudged when handled with dry hands or gloves.
Only change font Arial by 128 barcode
Save as template and that's all
We are using a macro to process the compression within barcode 128
We are using Barcode 128 to keep the spaces and special characters in our part description.
Our end customer dictates descriptions to be "NOUN, MODIFIER; ATTRIBUTE, ATTRIBUTE"