# AdapterForSmartReview

**AdapterForSmartReview** captures 3D graphics and attributes from Intergraph Smart Review and stores them in a `*.upvc` file. This file is then used as input for CAXperts **UDiTH Builder** to generate UDiTH or 3D PDF sessions.

## Additional prerequisites

- Recommended version: Intergraph Smart Review 2018 HF3 (`SPR13.00.00.0441`, `2019-07-26`)
- Use Intergraph Smart Review 2020 only in exceptional cases, and only if no other option is possible.

## Using AdapterForSmartReview

The AdapterForSmartReview setup automatically detects the platform of Intergraph Smart Review, whether 32-bit or 64-bit, and installs the appropriate version of AdapterForSmartReview. The 64-bit version of AdapterForSmartReview is required in order to work with the 64-bit version of Smart Review.

Start **AdapterForSmartReview** and select an **input file**. The following Intergraph Smart Review file types are supported: `*.vue`, `*.svf`, and `*.dri`.

<img src="./media/AdapterForSmartReview_image5.jpg" width="549" height="239">

**Output file:** 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, **AdapterForSmartReview** works in update mode and captures only the changes.

### Settings

All settings are stored automatically in the configuration file in the user profile. The location of this configuration file can be changed via **Tools** → **Settings**.

<img src="./media/AdapterForSmartReview_image6.jpg" width="372" height="331">

### General

**Configuration file:**

To export the settings, use **File** → **Save settings to file**:

<img src="./media/AdapterForSmartReview_image7.jpg" width="565" height="243">

To import settings from a file, use **File** → **Load settings from file**.

> **Load settings from file** does not change the current location of the configuration file. Once the settings have been imported, any further changes are stored in the current configuration file shown in the **Tools** → **Settings** menu.

**Aspects:**

All aspects from the SmartPlant Review session are captured automatically. No additional settings are required.

### Advanced

<img src="./media/AdapterForSmartReview_image8.jpg" width="515" height="431">

**Consider existing Display Sets** - If enabled, the visibility, for example whether objects are switched on or off in the Main View, and the colours are taken from the existing Smart Review Display Sets for `*.vue` files. This does not apply to `*.svf` session files.

**Maximum objects per capture group** - This is the maximum number of objects captured at one time. Higher values improve performance, but may also cause the Smart Review MDB file to overflow, as it is limited to a maximum size of `2 GB`. A value of `35000` is suitable for most sessions.

**Stroking tolerance** - Defines the quality of the exported graphics. Higher values mean better graphical quality, but they also increase the size of the exported graphics.

**Advanced Graphic Handling** - If this option is enabled, advanced measurement options become available in Universal Plant Viewer, for example snapping to edges.

**Use PDS Levels as Aspects** - Applicable only to DRI sessions. If enabled, every MicroStation level is treated as a separate aspect.

**Force attribute extraction** - Applicable when processing against an existing `*.upvc` file in update mode. If enabled, all attributes are extracted again, even when the individual objects in the existing `*.upvc` file are already up to date.

**Process modified vue-files completely** - This option mainly applies to `*.svf` sessions, where you want to reprocess complete `*.vue` files instead of individual objects within those files.

## Command Line Mode

> Due to restrictions in Smart Review, absolute paths must be used in AdapterForSmartReview command-line commands.

**AdapterForSmartReview** can also be used in command-line mode. Use the following command to display the available command-line arguments:

**C:\\\>"C:\\Program Files\\CAXperts\\AdapterForSmartReview\\AdapterForSmartReview.exe" /?**

The command-line arguments are shown after entering `/?`:

<img src="./media/AdapterForSmartReview_image9.jpg" width="773" height="224">

**AdapterForSmartReview** requires access to the desktop in order to run **Smart Review**. Therefore, to run the software as a scheduled task, the following steps are required:

1.  Download **<https://download.sysinternals.com/files/PSTools.zip>** and save it to disk, for example in `D:\PSTools\`.

2.  Create a BAT file, for example `D:\AdapterForSmartReview_Batch.bat`, which is used to run AdapterForSmartReview from the command line. Adjust the AdapterForSmartReview path and parameters as required:

>
> *D:\PSTools\psexec.exe -s -i 0 /accepteula "C:\Program Files\CAXperts\AdapterForSmartReview\AdapterForSmartReview.exe" -input:C:\Example.vue -output:C:\Output\Example.upvc*
>

-   `psexec.exe` executes AdapterForSmartReview in a separate console, session `0`. The software UI is not accessible or visible on the active desktop. To switch to session `0`, click the **View the message** button in the **Interactive Service Detection** window, which appears automatically after `D:\AdapterForSmartReview_Batch.bat` has started.

><img src="./media/AdapterForSmartReview_image10.png" width="468" height="294">

If this window does not appear, make sure that the **Interactive Services** service is enabled in the Windows Control Panel.

To return from the session `0` console to the main desktop, press the following button:

><img src="./media/AdapterForSmartReview_image11.png" width="360" height="219">

-   `D:\AdapterForSmartReview_Batch.bat` runs in a separate session. The active user can continue working in Windows or log off. Session `0` continues running in the background.

-   The `D:\AdapterForSmartReview_Batch.bat` script is executed under the `LocalSystem` account with limited permissions and without network access. Input and output files must therefore be located on a local drive. If you need network access, for example to copy the resulting `*.upvc` file to a network drive, add the corresponding commands to the end of `D:\AdapterForSmartReview_Batch.bat`.
    
    

## Advanced Features

### Advanced configuration for capturing graphics

This chapter is intended for advanced users. You can ignore it if advanced configuration is not required.

There are two types of `.ini` file: `User.ini` and one `.ini` file per project.
`User.ini` contains general settings that are valid for all projects. `Project.ini` contains only project-specific settings.

### Ignore objects (Project.ini)

The file size of the resulting PDF file depends noticeably on the number of objects captured. Ignoring less-meaningful objects (e.g. welds in **SmartPlant 3D** sessions) is one approach for reducing the overall 3D PDF file size.

The following syntax is used to define a custom object type in the `.ini` file:

```ini
[ObjectDefinition]
ObjectTypeName=AttributeName Operator Value
```

Example:

```ini
[ObjectDefinition]
MyWeld=Component=Weld
```

`[ObjectDefinition]` is the section name in the `.ini` file. `MyWeld` is the object type name and can be defined freely. `Component` is an attribute name that must exist in the design review session. The `=` character after `Component` is the operator. The operator can be `=` or `<>` for equality, or `like` and `not like` when using wildcards. `Weld` is the attribute value.

The example defines an object type `MyWeld` for objects whose attribute `Component` is equal to the value `Weld`. You can then create rules to ignore objects of type `MyWeld` using the following syntax in the `.ini` file:

```ini
[ObjectsToIgnore]
MyWeld=1
```

The `.ini` file is named `AdapterForSmartReview.ini` and is copied automatically from the installation template into the folder of the design review session loaded in **AdapterForSmartReview**. By default, the following definitions are included in the `.ini` file to ignore welds in **Smart 3D** sessions:

```ini
[ObjectDefinitions]
Weld= Component=Weld
Weld1= Commodity type Like *weld*
Weld2= Weld Type Like *weld*
Weld3= Type Like *weld*

[ObjectsToIgnore]
Weld=1
Weld1=1
Weld2=1
Weld3=1
```

## UseHierarchy (`User.ini`)

`UseHierarchy` is a user setting that reads the content of hierarchical labels in SPR.

`UseHierarchy=1` means that all hierarchical SPR labels are read from a `*.vue` file.

<img src="./media/AdapterForSmartReview_image18.jpg" width="642" height="492">

## SkipMissingModels

This setting applies only to the processing of `*.svf` sessions in batch mode. `*.svf` sessions can contain a large number of `*.vue` files. Missing individual `*.vue` files would normally stop the AdapterForSmartReview process. An internal default setting automatically skips missing `*.vue` files when the process is executed in batch mode or by using the UPC (UniversalPlantCreator).

## Log files

The software creates log files in the local `TEMP` directory, for example `C:\Temp\AdapterForSmartReview\`. You can also open these files by double-clicking the CAXperts **AdapterForSmartReview** status bar:

<img src="./media/AdapterForSmartReview_image12.png" width="682" height="394">
