Framework EDI Reference. Methods and Properties
ediGroup. GetSchema

Gets the schema that was used as a guideline to verify the syntax of the Functional Group, or to generate the Functional Group 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 oGroup As ediGroup
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 Functional Group from Interchange
Set oGroup = oInterchange.FirstGroup

' Get schema object of Interchange
Set oSchema2 = oGroup.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