Framework EDI Reference. Methods and Properties
ediDocument. ImportSchema

Specifies a schema to import as part of the guideline used by the document.

Syntax:

 Parameters:

 Returns:

If successful the object of type FREDI.ediSchema is returned; otherwise an empty object is returned if the operation fails.

Remarks:

ImportSchema method immediately imports the schema at the time that it is invoked unlike the LoadSchema method, which imports the schema at the time when the EDI document is about to be processed.

To explicitly import a version from the standard reference library, one has to specify the schema file name using the following format: 

 Where the Controlling Agency must contain one of the values:

 

 Example1.  To import a Standard Exchange Format (SEF) file.

Dim oEdiDoc As Fredi.ediDocument
Set oEdiDoc = New ediDocument
:
oEdiDoc.ImportSchema “C:\FILES\850.SEF”, 0

 

Example 2.  To import a version from the Standard Reference Library.  In this example, the version to import is: ASC/X12 version 4030.

Dim oEdiDoc As Fredi.ediDocument
Set oEdiDoc = New ediDocument
:
oEdiDoc.ImportSchema “X|004030”, 1