Framework EDI Reference. Methods and Properties
ediInterchange. GetSchema

Gets the schema that was used as a guideline to verify the syntax of the Interchange, or to generate the Interchange entity.

Syntax:

Returns

Returns an object of type FREDI.ediSchema.

Example

Dim oEdiDoc As ediDocument
Dim oSchema As ediSchema
Dim oSchema2 As ediSchema
Dim oInterchange As ediInterchange
Dim lSchemaHandle As Long
Dim sEdiFile As String
Dim sSefFile As String

sEdiFile = App.Path & "\850.X12"
sSefFile = App.Path & "\850.SEF"

Set oEdiDoc = New ediDocument
Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)

oEdiDoc.LoadEdi sEdiFile

' Get Interchange from document
Set oInterchange = oEdiDoc.FirstInterchange

' Get schema object of Interchange
Set oSchema2 = oInterchange.GetSchema
Debug.Print "Schema Handle: " & oSchema2.Handle
Debug.Print "Schema Version: " & oSchema2.Version
Debug.Print "Schema Industry: " & oSchema2.Industry
Debug.Print "Schema Version: " & oSchema2.StandardVersion