Framework EDI Reference. Methods and Properties
ediDocument. GetCommentTypes

Returns the Comment Types object.

Syntax:

Returns:

    Object of type FREDI.ediCommentType.

Remarks:

The ediCommentType object allows the user to specify tags to indicate the beginning and end of a comment text.  The object stores all the defined comment types that should be ignored in the document if they exist.

 The following is an example of how a comment can be embedded in an EDI document.

 :
GS*PO*350004 *00022*123454*1903*200000072*X*003060
ST*850*20001
###THIS LINE IS THE FIRST LINE OF COMMENT
###THIS IS THE SECOND LINE OF COMMENT
BEG*00*RE*1234456**030122
           

Example. 

'Visual Basic program to ignore comments in the above example:


Dim oEdiDoc As Fredi.ediDocument
Dim oSef As Fredi.ediSchema
Dim oCommentTypes As Fredi.ediCommentTypes
Dim sSefFile As String
Dim sEdiFile As String   


sSefFile = App.Path & "\850.sef"
sEdiFile = App.Path & "\850.x12"
sOutFile = App.Path & "\850.txt"   
Set oEdiDoc = New Fredi.ediDocument
Set oCommentTypes = oEdiDoc.GetCommentTypes
oCommentTypes.AddCommentType "COMMENT1", "###", "{13:10}"
Set oSef = oEdiDoc.LoadSchema(sSefFile, 0)
oEdiDoc.LoadEdi sEdiFile
oEdiDoc.Save sOutFile