• Description

    When using Stylesheet, Visual Basic Script or 'additional fields' in TAF Configuration, it is currently not possible to see the sequence of the fields that PrintMachine receives for processing.

    The following script will help you to visualize it.

    Using the Call OnFieldCollection will prevent from any delay on the productive process.When using the Preview function from ConfigurationTool a field list "Myflatfile.txt" is generated in the PrintMachine root folder.

    This text file will be renewed at every preview.

  • Answer

    Private Sub OnFieldCollection(DocFields As TAFFields)
     If Right(UCase(InDevice.OriginalFileName),6) = "\0.TXT" Then CreateFieldList(DocFields) 'active only on preview
    End Sub
    Private Sub CreateFieldList(oTAFFields As TAFFields)
    '.......................................generate Field List........................
    Dim oField As TAFField
    Dim lFreeFile As Long
    Dim sBuf As String
        On Error GoTo CreateFieldList_Error

         lFreeFile = FreeFile
         Open App.Path & "\Myflatfile.txt" For Output As #lFreeFile
             For Each oField In oTAFFields
                 sBuf = TAFSettings.FieldStart & _
                     oField.Name & _
                     TAFSettings.FieldEnd & _
                     oField.Value
                 Print #lFreeFile, sBuf
             Next oField
         Close #lFreeFile
    Exit Sub

    CreateFieldList_Error:
         App.PrintMessage "Error: " & Err.Number & " - " & Err.Description
         Close #lFreeFile
         Resume Next
    End Sub

Date created:
01/22/2015 11:38:32
Last updated:
02/11/2015 10:25:52
Product(range):
OMS-500
Print