Sub ImportExport() ' Define a constant to indicate that no optional ' data will be exported or imported. Const noOptionalData = 0 If WScript.Arguments.Count <> 2 Then WScript.Echo "Error: Invalid number of parameters." & vbCrLf & _ "Syntax:" & vbCrLf & _ "ImportExport {e | i} filename" Exit Sub End If 'Declare the objects needed Dim root ' The FPCLib.FPC root object Dim isaArray ' An FPCArray object ' Create the root object. Set root = CreateObject("FPC.Root") ' Get a reference to the array object. Set isaArray = root.GetContainingArray() If WScript.Arguments(0) = "e" Then WScript.Echo "Exporting the configuration of the " & _ isaArray.Name & " array object to " & _ WScript.Arguments(1) & " ..." ' Export the array configuration to the XML document. ' Notice that values are not specified for the ' optional parameters. isaArray.ExportToFile WScript.Arguments(1),noOptionalData WScript.Echo "Exporting was completed successfully." WScript.Quit End If If WScript.Arguments(0) = "i" Then WScript.Echo "Importing the configuration from " & _ WScript.Arguments(1) & " to the " & _ isaArray.Name & " array object ..." ' Import the array configuration from the XML ' file specified. Notice that values are not ' specified for some of the optional parameters. isaArray.ImportFromFile WScript.Arguments(1),noOptionalData,,,True WScript.Echo "Importing was completed successfully." End If End Sub ImportExport