Requirements:
- The preparatory steps on the file level have been carried out.
- EEC is started.
- Section Generating a configuration by importing an IMX file is carried out.
In addition to the system libraries, the library catalog contains the architecture T_Mechatronic_Architecture and the modular system T_Mechatronic_ModularSystem.
The Feeder project exists in the Project catalog.
The CSV file ParameterMap.csv is imported in order to fill the ParameterMap parameter with key-value pairs in the existing configuration. To this purpose the template file Template_CSV.imx is additionally required.
Description of the CSV file:
The CSV file consists of 9 rows and 3 columns.
The columns do not have any headers.
An area for header data is introduced via the data to be evaluated with a cell that contains the text Header. The header data end in the row that contains a cell with the text LineEndHeader.
The data to be evaluated are distributed across 3 columns:
A = Name of the parameter
B = Value of the parameter
C = Type of the parameter
These specifications are converted internally into a fragment in IMX format by means of the XSL file KeyValue.xsl. The fragment is inserted into the template file Template_CSV.imx instead of the <importFragment/> tag.
Content of the Template_CSV.imx:
<?xml version="1.0" encoding="utf-8"?>
<imx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" version="1.0">
<project name="Feeder" save="true">
<libraries>
<add type="String" value="T_Mechatronic_ModularSystem"/>
</libraries>
<mo name="Feeder" typeClass="T_Mechatronic_ModularSystem.Mechatronic.Stations.Feeder" >
<importFragment/>
</mo>
</project>
</imx>
Proceed as follows to fill a Map with key-value pairs:
- Select the menu item File > Import....
- Navigate to Project > Import.
- Confirm via [Next >].
- Specify the file ParameterMap.csv in the Source file name field.
- Select Standard:KeyValue.xsl from the drop-down list. This grays out the input field.
- Enter the file Template_CSV.imx in the Template file name field.
- Remove the Create new project option and mark the Feeder project in the list below it.
- Confirm with [Finish].
The import wizard opens with the Select page.
The import wizard opens the page Import file.
The file is located in the following directory:
<EEC installation path>\resources\Import\CSV
Use [Browse...] to navigate to the file. If applicable, select the file filter CSV files (*.csv).
The file is located in the following directory:
<EEC installation path>\resources\Import\IMX
Use [Browse...] to navigate to the file. If applicable, select the file filter IMX files (*.imx).
Result:
The configuration called Feeder is displayed in the project catalog:
- Open the Feeder component.
- Select the Parameters editor.
The Value column shows that the values from the columns A and B of the CSV file have been written as a key-value pair in the ParameterMap parameter.