This functionality is only available for certain module packages.

Writing values into individual parameters by importing a CSV file

Requirements:

In the existing configuration the Feeder component already contains parameters which do not, however, contain values as the following representation shows.

The CSV file Parameter.csv is imported in order to set parameter values in the existing configuration. To this purpose the template file Template_CSV.imx is additionally required.

Note:

Identically structured Excel files can be imported with the identical template and scheme files.

Proceed as follows to set parameter values:

  1. Select the menu item File > Import....

The import wizard opens with the Select page.

  1. Navigate to Project > Import.
  2. Confirm via [Next >].

The import wizard opens the page Import file.

  1. Specify the file Parameter.csv in the Source file name field.

The file is located in the following directory:

<EEC installation path>\resources\Import\CSV

Use [Browse...] to navigate to the file. If appropriate, select the filter Excel workbooks (*.xls, *.xlsx, *.xlsm).

  1. From the Customer scheme drop-down list, select the entry Default:Parameter.xsl. This grays out the input field.
  2. Enter the file Template_CSV.imx in the Template file name field.

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).

  1. Remove the Create new project option and mark the Feeder project in the list below it.
  2. Confirm with [Finish].

Result:

The configuration called Feeder is displayed in the project catalog:

  1. Open the Feeder component.
  2. Select the Parameters editor.

The Value column shows that all the values are enclosed with apostrophes (') and thus were imported as strings.

The ParameterBoolean parameter is filled with the value ='true'. Since this is not a valid Boolean value, false is entered as the result.

Formula errors are displayed for the parameters ParameterDouble and ParameterInteger because the imported values cannot be interpreted as Double or Integer respectively.

The ParameterMap parameter is not filled by the import and is therefore <<null>>.

Solely the ParameterString parameter is set correctly with the value Hello World.

In other words:

The third column of the CSV value is not detected during the conversion and consequently all the imported values are interpreted as a string.

If the parameters are to be imported with the correct type, the scheme file for the transformation of the CSV file has to be customized.

Proceed as follows to change the XSL file:

  1. Copy the <EEC installation path>\install\importschemas\Parameter.xsl file into the following folder:
  2. <EEC installation path>\resources\Import\XSL
  3. Rename the file to ParameterWithType.xsl.
  4. Open the file ParameterWithType.xsl with any editor, for example Notepad++.
  5. Navigate to the <xsl:template match="row" > tag in the file.

Appearance before the change:

<xsl:template match="row" >
	<xsl:choose>
		<xsl:when test="@number > $LineEndHeader ">
			<xsl:element name="parameter">
				<xsl:attribute name="name">
					<xsl:value-of select="col[@number='1']"/>
				</xsl:attribute>
				<xsl:attribute name="value">
					<xsl:value-of select="col[@number='2']"/>
				</xsl:attribute>
			</xsl:element>
		</xsl:when>
		<xsl:otherwise>
		</xsl:otherwise>
		</xsl:choose>
</xsl:template>

Insert the following rows at the end of the block of <xsl:element name="parameter">:

<xsl:attribute name="type">
	<xsl:value-of select="col[@number='3']"/>
</xsl:attribute>

The result should look as follows:

<xsl:template match="row" >
	<xsl:choose>
		<xsl:when test="@number > $LineEndHeader ">
			<xsl:element name="parameter">
				<xsl:attribute name="name">
					<xsl:value-of select="col[@number='1']"/>
				</xsl:attribute>
				<xsl:attribute name="value">
					<xsl:value-of select="col[@number='2']"/>
				</xsl:attribute>
				<xsl:attribute name="type">
					<xsl:value-of select="col[@number='3']"/>
				</xsl:attribute>
			</xsl:element>
		</xsl:when>
		<xsl:otherwise>
		</xsl:otherwise>
		</xsl:choose>
</xsl:template>

Import with the modified scheme file ParameterWithType.xsl:

  1. Select the menu item File > Import....

The import wizard opens with the Select page.

  1. Navigate to Project > Import.
  2. Confirm via [Next >].

The import wizard opens the page Import file.

  1. Specify the file Parameter.csv in the Source file name field.

The file is located in the following directory:

<EEC installation path>\resources\Import\CSV

Use [Browse...] to navigate to the file. If appropriate, select the filter Excel workbooks (*.xls, *.xlsx, *.xlsm).

  1. From the Customer scheme drop-down list, select the entry Customer scheme.
  2. Specify the modified scheme file.
<EEC installation path>\resources\Import\XSL\ParameterWithType.xsl

Use [Browse...] to navigate to the file. If applicable, select the file filter Scheme XSL files (*.xsl, *.xslt).

  1. Enter the file Template_CSV.imx in the Template file name field.

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).

  1. Remove the Create new project option and mark the Feeder project in the list below it.
  2. Confirm with [Finish].

Result:

The configuration called Feeder is displayed in the project catalog:

  1. Open the Feeder component.
  2. Open the Parameter editor.

The Values column shows that all the values have been imported with their own types.

The ParameterMap parameter is not filled by the import and is therefore <<null>>. In the next step this parameter is filled through importing.