How to import a Generic XML Import file

The XML import provides a vendor-independent means of importing configuration data to a project based on PcVue.

It is designed to imports an XML file containing elements and attributes that represents configuration items, plus values for their properties where appropriate.

Prior to the availability of XML import, the go-to method for externally generating the PcVue configuration was by directly creating and editing PcVue ASCII configuration files. Importing the configuration from XML files has major advantages over this method:

  • Not all properties of a configuration object have to be given values in the XML file. Any properties without values will be set to a default value by PcVue.
  • Once you have imported the configuration, properties that did not have values in the XML file can be configured using PcVue configuration dialogs.
  • After the first import, you can synchronize changes made in the XML file with the PcVue configuration by importing it again. The synchronize mechanism recognizes whether any changes have been made using PcVue configuration dialogs and does not overwrite them.

The schema description of Generic Import XML files and a list of the supported configuration items is available in the SDK & API documentation that you can install as part of the PcVue installation.

Some characters cannot be used as part of an XML file or the file would not validate against the XML specifications. Such characters must be replaced with substitute codes (ISO code).

Refer to the overview topic Smart Generators overview to learn more.

Using the Smart Generator for Generic XML import

  1. Go to Configure then Smart Generators and click New import. The Smart Generator for Generic XML dialog opens.

  2. Enter an import name and click on the ellipsis button to select the XML file. ClosedShow picture

  3. Click the Finish button to import the configuration described in the XML file.

During the import process, a dialog displays a time-bar of progress. If there is an error, the dialog reports it and the import stops. You can use the buttons >> and << during and after the import to display or hide the details.

Synchronizing an existing import

When you synchronize an import, the smart generator compares the configuration elements available in the import file with those that have been imported previously to PcVue.

The synchronizing process takes into account any filter that you may have used previously with the import. For example if there are 400 variables in the import file and the previous use of the import was with a filter and created 100 variables in PcVue, synchronization will inform you that there are 300 new variables available for import.

  1. Select the import to synchronize in the right pane of the Smart Generators dialog. A list with actions appears under the Import references pane. ClosedShow picture

  2. Click Synchronize. This will open the smart generator dialog in which you can reconfigure the import. If variables have been added to the import file since the last import, the smart generator will display the Import new variables dialog, inviting you to make either a full or a custom import of the remaining variables.

    • If you select full import, all variables not already in PcVue are imported.

    • If you select custom import, you can filter the variables using the Select variables dialog.

If the smart generator finds variables in PcVue that no longer exist in the import file, a list of the variables is displayed. Using this list, you can choose to remove some or all of the variables from PcVue.

You can choose to only remove imported configuration elements of a smart generator without removing the smart generator import itself. This can be done by right-clicking the import generated and selecting Remove all imported objects.

Import using the command line

You can run a generic XML import from a command line by entering a command, set up a shortcut, or use a script to run the executable file XmlImporter.exe found in the BIN folder of PcVue. The file XmlImporter.exe must not be moved from that folder.

The syntax is as follows:

Copy
XmlImporter.exe file1 [file2 [file3...]] [-synchro:fast|full] [-login:xxx -password:xxx]
  • fileX - The name of an XML file to be imported or the name of a file that contains a list of XML files to be imported.

  • -synchro:fast - Fast synchronization is similar to full synchronization except that ONLY properties that have been changed are updated.

  • -synchro:full - The XML import file is compared to any previous file that was imported and all new elements are created and those that no longer exist are deleted from the project's configuration.

  • -login - The account name to be used to connect to PcVue for the import.

  • -password - The password to be used for the account to connect to PcVue used for the import.

The filenames are separated by spaces. They must not be separated by any other character (comma for example).

When a file contains a list of other files to be imported, the list is itself XML-formatted as follows:

Copy
<Imports>
    <Import>Import1.xml</Import>
    <Import>Import2.xml</Import>
</Imports>