10 Replies Latest reply on Nov 26, 2018 6:12 AM by Patrick S

    barcode 128

    Gary Westland

      Has anyone added barcode 128 to a part or assembly file property variable? We would like to use this data down stream on a drawing.

      We have managed to introduce the macro code to create a barcode 128 item that does display on our drawing sheet, but we are looking for other ideas and want to hear what other have done.

        • Re: barcode 128
          Rubén Rodolfo Balderrama

          Yup I did it....See one example

          • Re: barcode 128
            Kevin Chandler

            Hello,

             

            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.

             

            Just typin',

             

            Kevin

              • Re: barcode 128
                Gary Westland

                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.

                  • Re: barcode 128
                    Ivana Kolin

                    do you use some kind of barcode font?

                    Barcode Font - Completely Free Download of code 3 of 9 and 128 Barcode Fonts

                     

                    
                    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
                    
                      • Re: barcode 128
                        Patrick S

                        i have two questions regarding this macro. how do you implement it? i.e. i want to make a template where, a field of text is manually generated to code39, but without having to instal a .ttf file on every computer, which can end up using this template?

                         

                        is there a code39 version of this`?

                  • Re: barcode 128
                    Gary Westland

                    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

                      • Re: barcode 128
                        Rubén Rodolfo Balderrama

                        Why you use a macro?

                        a requiriment of Ford is

                        1. 1. The barcode (itself) is to be printed on a white background
                        2. 2. The barcode symbology is to be code 39 or code 128.
                        3. 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

                        1. 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.

                        1. 5. The barcode label material is to be low sheen or non-gloss and have a permanent adhesive backing.
                        2. 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

                      • Re: barcode 128
                        Gary Westland

                        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"