# AdapterForE3d

**AdapterForE3d** captures 3D graphics and attributes from AVEVA PDMS sessions, for example `*.rvm` and `*.att` files, and stores them in a `*.upvc` file. This file is then used as input for CAXperts **UDiTH Builder** to generate Universal Plant Viewer or 3D PDF sessions.

## Using AdapterForE3d

Start **AdapterForE3d** and select either one **input file** or multiple **input files**. PDMS `*.rvm` files are supported. Attribute files, such as `*.att` or `*.txt`, should be located in the same folder and should have the same name as the related `*.rvm` files.

<img src="./media/AdapterForE3d_image10.jpg" width="566" height="351">

**Output directory:** Defines the path to the `*.upvc` output file. This file contains all required information, such as graphics and attributes, needed to generate UDiTH or 3D PDF output using CAXperts **UDiTH Builder**.

If the `*.upvc` output file already exists, **AdapterForE3d** works in update mode and recaptures data only if the last modified date of the `*.rvm` file is newer than that of the `*.upvc` file.

## Aspects for PDMS models

In PDMS, it is possible to export 3D graphics together with additional aspects, for example insulation and obstruction. Because these aspects cannot be exported separately, but only together with the base graphic (`Simple Physical`), several files are produced that contain the base graphic plus the additional aspect.

AdapterForE3d can use an additional text file to assign this extra graphic directly to a corresponding aspect in the UPV model.

A template for this file is available at `C:\Program Files\CAXperts\AdapterForE3d\Templates\Aspect.txt`.

This file only needs to be present and adapted during conversion with the PDMS adapter in the directory where the `*.rvm` files are located.

You only need to specify the syntax of the files containing this additional aspect graphic.

This creates the additional graphics from the `*.rvm` files on separate aspect layers in UPV, where they can easily be switched on and off in the model.

<img src="./media/AdapterForE3d_image11.jpg" width="695" height="356">

`PDMS-Model.rvm` contains only the base graphic and is assigned to `Simple Physical`.

`PDMS-Model_Insulation.rvm` contains the base graphic and the insulation graphic and is assigned to `Insulation`.

`PDMS-Model_OBSTR.rvm` contains the base graphic and the obstruction graphic and is assigned to `Obstruction`.

## Additional `.ini` Parameters

Additional parameters can be defined in the `.ini` file.

The `.ini` file is usually located in `%AppData%\CAXperts\AdapterForE3d`.

### `unset` Attributes from E3D/PDMS

By default, all attribute values set to `unset` are skipped by AdapterForE3d.

However, these attributes can still be imported by adding an entry to the `.ini` file.

Import all attributes with the value `unset`:

```ini
[UnsetAttributes]
Unset=1
```

Import selected attributes with the value `unset`. Attribute names are separated by semicolons:

```ini
[UnsetAttributes]
Unset=mto; EQP_Status; Approval_date
```

<img src=".\media/AdapterForE3d_image14.jpg" width="506" height="209">

### Remove Duplicated Aspect Graphics

When exporting `*.rvm` files from PDMS, the aspects `Insulation` and `Obstruction` are always exported together with the basic solid graphic.

As a result, graphic elements may appear several times in the model. This can reduce viewing performance, especially in very large models. These duplicate graphics can be removed from the model afterwards by using an additional switch setting as a post-process step. This post-process may increase the conversion time.

```ini
[Settings]
RemoveDuplicatedAspectGraphics=1
```

<img src=".\media/AdapterForE3d_image15.jpg" width="386" height="239">

### Do Not Group Equipment Graphics

By default, the individual primitives of a piece of equipment are grouped together. This results in a smaller model size with fewer objects in UPV, which has a positive effect on navigation speed. However, this grouping can be disabled so that the smallest object units remain the primitives themselves.

```ini
[Settings]
DoNotGroupEquipment=1
```

<img src=".\media/AdapterForE3d_image16.jpg" width="386" height="239">

## Command line mode

**AdapterForE3d** can also be used in command line mode. Use the
following command to show the command line arguments:

```
C:\\\>"C:\\Program Files\CAXperts\\AdapterForE3d\\AdapterForE3d.exe" /?
```
Command line arguments:

<img src="./media/AdapterForE3d_image12.jpg" width="717" height="179">

`-input:C:\Example.rvm`

Occurrence: `AtLeastOnce`

Help text: Path to a PDMS `*.rvm` file or a directory containing multiple PDMS `*.rvm` files.

`-output:C:\Output\Example.upvc`

Occurrence: `AtMostOnce`

Help text: Path of the output file.

`-log`

Occurrence: `Arbitrary`

Help text: Path of the log file. If not defined, the log file is placed in `C:\Users\<user>\AppData\Local\Temp`.

## Log files

The software creates log files in the local `TEMP` directory, for example `C:\Temp\AdapterForE3d\`.

You can also open these files by double-clicking the CAXperts **AdapterForE3d** status bar:

<img src="./media/AdapterForE3d_image13.png" width="672" height="426">