# ExcelImportPlugin

The **ExcelImportPlugin** is used to sideload additional attribute data not included in the initial source files. This feature helps to implement data from sources other than the original authoring systems and can contain any information, e.g. from third-party-sources or databases.

## Setup Procedure

The **ExcelImportPlugin** is not an executable plugin and comes without a setup routine. After the file download, unpack the content of the container (.zip) to **one** of the directories listed.

For current user use only:

%AppData%\\CAXperts\\UDiTH Builder\\Plugins\\

For all users (administrator rights might be required):

%programfiles%\\CAXperts\\UDiTH Builder\\Plugins\\

## Usage

## Attribute and Value Definition

The Attributes are defined in an Excel file following a fixed syntax:

![alt text](media/ExcelImportPlugin_image6.png)

**Source Attribute (UPVC)** -- The Source Attribute to look for when adding a new attribute.

**Source Value (UPVC)** -- Specifies a condition for the Source Attribute value.

**New Attribute** -- The new attribute you wish to define.

**New Value** -- The value to be stored under the new attribute.

By choosing a Source Attribute that applies to multiple objects, the new attribute is added to all objects containing that attribute with the defined Source Value.

Further **New Attribute** and **New Value** can be added to import multiple attributes

For importing attributes to IntelliPID the sheet in the Excel file needs to be named "IntelliPID_Import", for 3D the sheet should be called "Import".

## File Name and Placement

Multiple Excel files are supported. The ExcelImportPlugin will consume all Excel files within the "ExcelImport" folder next to the selected UPVC/UPVM file.

> This folder must be placed in the directory containing your .upvc files.

If this is the case, the files in the folder will automatically be considered once the plugin is activated in the UDiTH Builder

If the folder is not present, the file defined in the configuration file will be used. If that file is not found, either, the plugin will be ignored in the building process.

## Activating the ExcelImportPlugin

To import the additional attributes and values, the ExcelImport Plugin must be activated first. Go to **Tools → Settings** in the menu bar and select the **Plugins** tab. Select the "UPVPluginExcelImport" plugin from available plugins (fig. 2-1), transfer it to the used plugins by clicking on the **\[\>\]** button (fig. 2-2) and confirm your selection with **\[OK\]** (fig. 2-3).

<img src=".\media/ExcelImportPlugin_image7.png" width="778" height="370">

## Configuration File

The plugin is configurable through a configuration file named UPVPluginExcelImport.xml. This file is located alongside the .dll of the plugin (see chapter "Setup procedure"). It contains three values that can be set for configuration (fig. 3).

```xml
<?xml version="1.0" encoding="utf-8" ?>
<Config>
  <Folder>C:\ExcelImport</Folder>
  <SheetName>Import</SheetName>
  <SheetNameIntelliPID>IntelliPID_Import</SheetNameIntelliPID>
  <Debug>1</Debug>
  <ProcessOrder>100</ProcessOrder>
  <Threads>4</Threads>
</Config>

```

**Connection String** -- Will be used if no If no ExcelImport folder exists. If  ExcelImport folder and this file does not exist, the plugin is ignored.

**SheetName** -- Specifies the sheet to be used for import

**SheetNameIntelliPID** -- Specifies the sheet to be used for import for IntelliPid

**Debug** -- Activated the debugging mode with detailed information on the building process **0** for deactivated, **1** for activated.

**ProcessOrder** -- Process order of the plugin lowest first.

**Threads** -- Threads to use for processing.
