This functionality is only available for certain module packages. Info / Copyright
Importing a configuration as an XML file
The configuration that you carry out manually in the Project BuilderThe project-specific configuration and the automatic generation of the project documentation takes place in the Project Builder on the basis of the configurators and sets of rules defined in the Designer. can also be imported manually from an XML file instead. This shortens the configuration process.
The XML file must include certain structure elements so that it can be imported.
Basic structure elements | Meaning |
---|---|
|
Identifies the XML file as a configuration file. All the information must be located within this structure element. |
|
Identifies the block which includes the information on all the configuration variables. |
|
Includes the value for a certain configuration variable. The exact designation of the configuration variable must be entered as the name. |
Structure elements for instances | Meaning |
---|---|
|
Identifies the block which includes the information on all the instances of one element to be configured. The exact designation of the element to be configured must be entered as a name. |
|
Identifies the block that contains the information on all the configuration variables of one instance. |
Example: Basic structure of an XML file
Here you see the structure of the XML file, which you can use for the configuration of the configurator 'Generate sample project with variants' from the library 'ESS_Sample_Macros':
<Configuration typical="XML_IMPORT">
<ConfigurationVariables>
<ConfigurationVariable name="OP_Measuring_Transformer">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Light_power">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Receptacles_power">2</ConfigurationVariable>
<ConfigurationVariable name="SE_Light_control">true</ConfigurationVariable>
<ConfigurationVariable name="SE_Receptacles_control">2</ConfigurationVariable>
<ConfigurationVariable name="OP_Control_panel">false</ConfigurationVariable>
<ConfigurationVariable name="OP_Panel_Enclosure">true</ConfigurationVariable>
<ConfigurationVariable name="OP_Panel_Control">false</ConfigurationVariable>
<ConfigurationVariable name="SE_Drive_Transport">Frequency Control</ConfigurationVariable>
<ConfigurationVariable name="SE_Method">Electric</ConfigurationVariable>
</ConfigurationVariables>
</Configuration>
Example: Structure of an XML file for the configuration of instances
Here you see the structure of an XML file that you have to follow for the configuration of instances:
<Configuration typical="XML_IMPORT">
<TypicalInstance name="Conveyor" >
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 1</ConfigurationVariable>
<ConfigurationVariable name="parameter2">1234</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 2</ConfigurationVariable>
<ConfigurationVariable name="parameter2">5678</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 3</ConfigurationVariable>
<ConfigurationVariable name="parameter2">9012</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
<Instance>
<ConfigurationVariables>
<ConfigurationVariable name="parameter1">some string .... 4</ConfigurationVariable>
<ConfigurationVariable name="parameter2">3456</ConfigurationVariable>
</ConfigurationVariables>
</Instance>
</TypicalInstance>
<TypicalInstance name="Enclosure" >
...
</TypicalInstance>
</Configuration>
Preconditions
- You have called up the Project Builder dialog and opened the library which includes the configurator you want to configure.
- You have selected a target project and opened the configurator.
- You have selected the element of the configurator into which you want to import a configuration.
Importing an XML file
- Click the Import button next to the display of the target project.
- The system dialog Open file is displayed.
- Select the XML file which contains the configuration for the element you have opened in Project Builder. Then click Open.
- The configurator is enriched with the information from the XML file. The manual selection of individual values is not required anymore.
Notes
- Information on the designation, type and value of a configuration variable in a XML file must exactly fit the elements in the configurator. If the information does not match, you receive an error message on the affected variable and the import is canceled.
- The XML import is available as of the Cogineer Cloud Advanced module package.