# Appendix - Custom Settings Files

UDiTH uses a range of files that can be used to customise both the content and the options available in the software.
This appendix provides an overview of the different file types.

## Configuration File

By editing the configuration file, you can hide buttons in the menu on the left, the tree bar at the top of the screen, and the menu on the right.
Only the tab bar at the bottom cannot be hidden, so that PDFs and other internal documents can still be viewed and closed.

The configuration is stored in `defaultConfig.upv` in the same folder as `UDiTH.exe` and can be edited using a text editor.

### MenuItemVisibilitySettings

Table 8 lists the available menu item visibility configuration.

<table>
<tr><th>Icon</th><th>Key</th><th>Description</th></tr>

<tr><td>

<img src="./media/ButtonSettings.png" width="44" height="44">

</td><td>

SettingsButton

</td><td>

Hide the **Settings** button.

</td></tr>
<tr><td>

<img src="./media/ButtonSettings.png" width="44" height="44"><img src="./media/ButtonProjectView.png" width="44" height="44">

</td><td>

TreeToggleButton

</td><td>

Hide the **nTreeToggleButton** button.

</td></tr>
<tr><td>

<img src="./media/ButtonSettings.png" width="44" height="44"><img src="./media/ButtonTreeConfig.png" width="44" height="44">

</td><td>

ProjectTreeConfigurationButton

</td><td>

Hide the **Configure the project tree** button.

</td></tr>
<tr><td>

<img src="./media/ButtonAdd.png" width="44" height="44">

</td><td>

FilesTreeAddButton

</td><td>

Hide **Add File** button.

</td></tr>

</table>

> Keep in mind that certain elements can influence others.

> MenuItemVisibilitySettings is available from UDiTH version 2026.4.0 onwards. 

**Example:** The following configuration hides the all the buttons in mentioned above:

```json
{
  "CommonSettings": [
    {
      "MenuItemVisibilitySettings": {
        "SettingsButton": false,
        "TreeToggleButton": false,
        "ProjectTreeConfigurationButton": false,
        "FilesTreeAddButton": false
      }
    }
  ]
}
```
---

The configuration is divided into four blocks:

-   **CurrentViewSettings**: Defines the default view when the UDiTH model is opened for the first time or reset.

-   **Views**: Stores all saved views.

-   **CommonSettings/UserSettings**: The default UDiTH settings can be distributed between these two blocks as required. Use `CommonSettings` for settings that should apply to all users, and `UserSettings` for settings that are specific to individual users.

Blocks from multiple configurations are merged. Common settings are not saved by default.

### Filters

You can define filters for setting blocks in both `CommonSettings` and `UserSettings`.

UDiTH always uses the first matching block for each unique feature. All following matches are ignored.

A `Filters` block can contain multiple clauses. These are linked with the `OR` operator.

**Example:**

```json
"CommonSettings": [
  {
    "Filters": [
      { "DeviceType": "IOS" },
      { "DeviceType": "Android" }
    ],
    "LodTrianglesLimit": 50000000
  },
  {
    "LodTrianglesLimit": 50000001
  }
]
```

In this example, all users with an Android or iOS device have a triangles limit of `50000000`.

All other users have a triangles limit of `50000001`.

### Possible Filters

`UserDomainName = "Caxperts01"`

`DisplaySize = ...` options: `Smartphone` (`< 9 inch`), `Tablet` (`9-14 inch`), `Desktop` (`14-28 inch`), `Large` (`28-40 inch`), `VeryLarge` (`> 40 inch`)

`DeviceType = ...` options: `Windows`, `IOS`, `Android`, `UniversalWindowsPlatform`

`DeviceName = ...`

`UserName = ...`

### Recap: Elements that can be predefined / added

Predefining certain elements can speed up work in UDiTH, especially for routine tasks.

The relevant chapters describe how to predefine:

-   Views

-   Volumes

-   Reports

You can also add:

-   Colour files

-   Link files

-   Object lists for creating double-sided ISOs

## Autostart Files

UDiTH automatically considers a number of default and settings files during start-up. For this to work, the files must be named exactly as shown below:

| Location | Name | Function |
| --- | --- | --- |
| `.\Data\` | `default.upvf` | Default UPVF file to load at startup. |
| `.\Data\` | `links.xlsx` | Linking file for external links and documents. |
| `.\Data\` | `intelliPidLinks.xlsx` | Linking file for external links and documents in IntelliPID. |
| `.\Data\` | `attributes.xlsx` | Definition of custom attributes to be used. |
| `.\Data\` | `intelliPidAttributes.xlsx` | Definition of custom attributes to be used in IntelliPID. |
| `.\Data\` | `attributeData.xlsx` | Custom attribute values to be loaded on UDiTH start-up. |
| `.\Data\` | `intelliPidAttributeData.xlsx` | Custom attribute values for IntelliPID to be loaded on UDiTH start-up. |
| `.\Data\` | `ReportDefinition.xlsx` | Definition of reports and their filters. |
| `.\Data\` | `intelliPidReportDefinition.xlsx` | Definition of reports and their filters for IntelliPID. |
| `.\Data\colorfiles\` | `upvcolorindex.txt` | Listing of the default display styles shown in the UDiTH **Load display style** menu. |
| `.\Data\` | `upvsketchitemindex.txt` | Lists all catalogue items to be shown in sketching. |
| `.\Data\` | `upvintellipidsketchitemindex.txt` | Lists all catalogue items to be shown in IntelliPID sketching. |
| `.\Data\` | `appcontrols.json` | Provides configuration to AppControl usague restrictions |

## Link Mapping Files

There are three ways to add links to your UDiTH model:

-   During the building process through a link mapping file

-   Automatically loading a link mapping file on start-up (`links.xlsx` in the `\Data\` folder of the model)

-   Loading a link mapping file manually, see **File menu** in the chapter **Left side menu**.

All three methods use the same type of definition in the form of an Excel link mapping file:

<img src="./media/IntelliPID_image127.png" width="705" height="94">

**Link** - The link can be a web link to a website or web-based database with the required link structure, an absolute path, or a path relative to the model's root directory, which is the directory that contains the `Data` folder.

**Condition** - The condition can be any filter, including wildcards, that relates to an attribute in UDiTH.

**Name** - The name is the display name of the link. This is the text shown in the Attributes panel in UDiTH.

**Colour** - The colour setting can be either a hexadecimal RGB colour definition preceded by a **\#** or one of the Excel default colours in
clear name notation: **black, white, red, green, blue, yellow, magenta, and cyan**.

## Custom Attributes

Custom attributes are user-defined attributes that can be changed before each launch of UDiTH. Their values can also be changed at runtime, except for calculation attributes. The custom attributes for IntelliPID are defined in `intelliPidAttributes.xlsx`. This file can contain four worksheets (tabs):

-   **Definition**

-   **Codelist**

-   **Filter**

-   **Meta**

### Worksheet "Definition"

<img src="./media/IntelliPID_image128.png" width="768" height="143">

This worksheet defines the custom attributes.

**Id** -- The ID of the custom attribute can be any number. The only requirement is that each ID must be unique throughout the full list of custom attributes. This ID is later used for value assignment.

**Name** -- The name under which the attribute is displayed in UDiTH.

**SourceAttribute** -- The attribute to which the custom attribute attaches itself. For example, `SP_ID` can generate many entries because it attaches itself to every object with the attribute `SP_ID`. This can affect UDiTH performance.
It is strongly recommended to define `SourceAttribute` as specifically as possible.

**Filter** -- Sets a filter so that custom attributes are assigned only to objects covered by that filter. A filter can be entered directly here, and wildcards are supported. Alternatively, a predefined filter can be used from the `Filter` worksheet.

> Filters are applied sequentially. Consider using predefined filters instead. When the same filter is used several times in a definition, the corresponding query is executed several times, which can reduce performance.

**DataType** -- The data type defines which properties an attribute has. There are three basic types:

-   **Calculation** -- Defines a value that is calculated when UDiTH starts. This is the only type of custom attribute that cannot be changed at runtime. In IntelliPID, only the `HasLink` calculation is available. `DefaultValue="ThreeD"` is mandatory, and the result is a Boolean value that indicates whether the object exists in 3D.

-   **Freetext** -- Defines a freely editable text attribute that can be changed at runtime. All value strings are accepted.

-   **Codelist** -- Defines a codelist attribute. In UDiTH, these attributes are displayed as a combo box, allowing you to choose from a predefined list of values. See the `Codelist` worksheet.

**DefaultValue** -- The value that is assigned automatically to the custom attribute without any manual input.
Depending on the `DataType`, different options are available:

-   **For Calculation** -- Only `DefaultValue="ThreeD"` is available.

-   **For Freetext** -- Can be left blank or contain any string.

-   **For Codelist** -- The default value should be one of the values listed in the codelist definition.

**Parameter1** -- This field provides additional parameters depending on the `DataType` of the attribute:

-   **For Calculation** -- Only the parameter `HasLink` is available.

-   **For Freetext** -- Not used.

-   **For Codelist** -- The name of the codelist to use. See the `Codelist` worksheet.

The `Id` field must remain unique throughout the complete custom attributes list.

### Worksheet "Codelist"

<img src="./media/IntelliPID_image129.png" width="680" height="237">

This worksheet defines the codelists for custom attributes.

**Name** -- The name of the codelist. This is the same name used in `Parameter1` on the `Definition` worksheet.

**Value** -- Defines all values available for the codelist under the corresponding name.

**Colour** -- Defines the colour in which the respective value is shown in UDiTH. This also affects the colour used in the legend. It can be either a hexadecimal RGB colour definition preceded by `#`, or one of the Excel default colour names: **black, white, red, green, blue, yellow, magenta, and cyan**.

### Worksheet "Filter"

This worksheet is used to define frequently used filters for custom attributes.

Filters entered directly in the `Definition` worksheet are always executed separately, even if the filter strings are identical.
This can slow down the loading of custom attributes when UDiTH starts.

Instead, you can use the `Filter` worksheet to define a referenced filter. Filters defined here are executed only once, no matter how often they are referenced from the `Definition` worksheet. A direct filter runs every time it is used, whereas a predefined filter reuses the result and therefore improves performance when loading custom attributes.

<img src="./media/IntelliPID_image130.png" width="635" height="65">

**Name** -- The unique name of the filter to be used as a reference. This name can be chosen freely.

**Filter** -- The actual filter string, as described in the `Definition` worksheet. Wildcards are supported.

### Worksheet "Meta"

This worksheet defines the parameters used for emailing custom attribute changes.

<img src="./media/IntelliPID_image131.png" width="619" height="83">

For IntelliPID, two keys are available:

-   **WorkcardMail_To** -- The recipient or list of recipients for the list of custom attribute changes.

-   **WorkcardMail_Subject** -- The subject that is added automatically to the generated email.

## Report Definitions

To define a report that appears in the report selection list, use the file `intelliPidReportDefinition.xlsx`. There are two ways to create a new report definition:

### Definition by Copy

Create a new report and use **Copy current report definition** in the **Report Results** screen. This copies the current report definition to the clipboard. You can then paste the clipboard contents into the next free row of the report definition file.

### Manual Definition

You can also create a report definition manually by editing the report definition file directly:

<img src="./media/IntelliPID_image132.png" width="736" height="113">

The following fields are used to define a custom report. The highlighted fields are optional and can be left empty without affecting functionality:

**Name** -- The name of the report.

**Forbidden** (optional) -- define actions you wish to block for the report: **C** (customise), **F** (filter), or **S** (save).
You can also combine these restrictions with comma or semicolon.
Example: **C,F;S**

**Description** (optional) -- An additional description explaining the purpose of the report.

**Sort Column** -- Defines the column by which the report is sorted. If no prefix is added, the report is sorted in ascending order. Optionally, you can add the prefix `ascending:` or `descending:` before the attribute.

**Filter** (optional) -- All attributes, including custom attributes as well as wildcards can be used for filtering.

**Scope** (optional) -- Defines the scope of the P&IDs. Options are **All**, **All Open**, **CurrentDrawing**, and **Selected**.

**Attributes** -- The attributes to be included in the report. For each additional attribute, add an entry in the next free column to the right. The number of attributes is not limited.

There are two additional special attributes for reporting: **Colour** returns the current colour of the object, and **Count** returns the number of objects contained within that object. For example, a vessel with four nozzles has a count of five.

## Display Styles

### Colour List File

UDiTH uses one central list file, `upvcolorindex.txt`, to define the available display styles. This file is located in the **colourfiles** folder within your model's **Data** folder. It is loaded automatically when UDiTH starts. It contains the names of the colour files that are shown by default in the **Set display style** selection in the **File menu**.

### Colour Files

You can create custom colour files in Excel to define colours, conditions, and colour groups.

<img src="./media/IntelliPID_image133.png" width="487" height="143">

**Colour** -- Defines the colours used to colourise the designated items. There are two ways to define a colour:

-   Use Excel colours in clear name notation: **black, white, red, green, blue, yellow, magenta, and cyan**.

-   Use HTML (hexadecimal) colour codes starting with \# followed by 6 digits for the basic colours plus two optional digits for opacity:
    **\#RRGGBBOO**. Please note that the hexadecimal values range from 00 (decimal 0) to FF (decimal 255).

For **Condition**, you can enter a filter for any attribute or custom attribute. Wildcards are supported.

**Aspect** is an option for 3D colouring and is not used for IntelliPID display styles.

**GroupName** is an optional value that allows you to define separate colour groups within one file. This lets you define several different conditions without needing separate colour files. Conditions that belong to the same colour group must use exactly the same group name.

## Sketch Item Index File

To use custom sketching items, you must create a Sketch Item index file named `upvintellipidsketchitemindex.txt`. This file contains the paths to the Sketch Item files that you want to include in your model.

A catalogue item consists of a pair of files: an `.svg` file, which defines the graphics of the symbol itself, and a `.jpg` or `.png` file, which provides the preview shown in the catalogue.

### Adding Objects to the Catalogue

You can add any `.svg` file, together with an optional corresponding `.jpg` or `.png` file, to your catalogue. UDiTH loads it when the model starts if the object is valid and correctly listed, with name and path, in the Sketch Item index file. You can use absolute paths, relative paths, and includes:

**Absolute path** - `C:\temp\Pumps\pump2.svg`

**Relative path** -- `IntelliPidCatalogue\Valves\valve1.svg` (relative to the location of your UDiTH model folder)

**Include** - `#include D:\yourindex.txt` - Include can be used to manage objects for the whole company across as many files as required, rather than adding individual objects to individual models. In this example, `yourindex.txt` refers to a separate Sketch Item index file.

## Deep Linking in IntelliPID

You can include deep links in any document type that supports links, such as Word files, websites, or emails, to open UDiTH and transfer a combination of queries and commands.

Deep linking uses the URL handler `upvapi://`.

**Structure:**

`upvapi://<MODEL-URL>?<QUERY>&<COMMANDS>`

**Example:**

`upvapi://http://demo.universalplantviewer.com/demoPlant/6/0?Equipment%20ITEMTAG=D-240&CMD!Target=IntelliPid&CMD!OpenIntellipidDrawings&CMD!Select&CMD!Fit`

This looks for `Equipment_ITEMTAG=D-240`, opens the corresponding drawing in IntelliPID, selects the item, highlights it, and fits it to the screen.

> Broken links, for example those caused by typing mistakes, do not produce an error message. Use `%20` for spaces.

**Wildcards:**

-   `*` = any character

-   `_` = any single character

### Condition Operators

By default, query conditions are combined with **AND**:

`Equipment%20ITEMTAG=K-001&Nozzle Name=N5`

You can use **OR** with the combine command:

`Equipment%20ITEMTAG=K-001&Equipment%20ITEMTAG=D-100&CMD!Combine=OR`

## Drawing Templates

Creating a drawing requires a drawing template. The available drawing templates are defined in the text file `drawingtemplates.json`, which is located in the UDiTH model data folder: `Data\drawingtemplates`.

Each drawing template contains all necessary information, including the name, the drawing border file (`.svg`), and the parameters for one or more drawing views.

The drawing border files can be located in any folder within the `drawingtemplates` folder.

Each drawing template requires the parameters shown in the table below.

| Parameter | Description |
| --- | --- |
| `Name` | The template name as shown in UDiTH. |
| `BorderFile` | The `.svg` file, including its relative path to the `drawingtemplates` folder, for example `en/EN_Metric_A1_Border_Wide.svg`. |
| `DrawingArea` | Contains the parameters for each drawing view. |
| `Top` | The upper border of the drawing view in `[mm]`. |
| `Left` | The left border of the drawing view in `[mm]`. |
| `Width` | The maximum width of the drawing view in `[mm]`. |
| `Height` | The maximum height of the drawing view in `[mm]`. |
| `ViewDirection` | Defines the view direction for the drawing view: `FromNorth = 0`, `FromEast = 1`, `FromSouth = 2`, `FromWest = 3`, `FromTop = 4`, `FromBottom = 5`, `FromTopSouthWest = 6`, `FromTopSouthEast = 7`, `FromTopNorthWest = 8`, `FromTopNorthEast = 9`, `FromBottomSouthWest = 10`, `FromBottomSouthEast = 11`, `FromBottomNorthWest = 12`, `FromBottomNorthEast = 13`. |
| `PrintScale` | A predefined fixed scale. For example, `100` defines a scale of `1:100`; `0.0` defines automatic scaling. |
| `Fit` | If `true`, the maximum possible scale, for example `1:178`, is used. If `false` or missing, the maximum possible standard scale, for example `1:200`, is used. |
| `UseCommonScale` | `true` or `false`. `true` means the drawing area uses the lowest possible common scale for all drawing areas marked `UseCommonScale = true`. `false` means the drawing area uses the lowest possible scale for that individual drawing area. The calculated scale is shown in the drawing if the `.svg` file contains a text field marked as `###SCALE###`. |

Examples of two simple templates:

```json
[

{

\"Name\": \"EN, Metric, A1 Wide, Isometric View\",

\"BorderFile\": \"en/EN_Metric_A1_Border_Wide.svg\",

\"DrawingAreas\": \[

{

\"Top\": 12.0,

\"Left\": 22.0,

\"Width\": 806.0,

\"Height\": 515.0,

\"ViewDirection\": 6,

\"PrintScale\": 0.0,

\"Fit\": false,

\"UseCommonScale\": true

}

\]

},

{

\"Name\": \"EN, Metric, A4 Wide, Top View\",

\"BorderFile\": \"en/EN_Metric_A1_Border_Wide.svg\",

\"DrawingAreas\": \[

{

\"Top\": 12.0,

\"Left\": 22.0,

\"Width\": 806.0,

\"Height\": 515.0,

\"ViewDirection\": 4,

\"PrintScale\": 0.0,

\"Fit\": false,

\"UseCommonScale\": true

}

\]

}

]
```

Example of multiple drawing views in a single template, for example for a standard orthographic projection:

```json
[

{

\"Name\": \"EN, Metric, A3 Wide, Standard Views\",

\"BorderFile\": \"en/EN_Metric_A3_Border_Wide.svg\",

\"DrawingAreas\": \[

{

\"Top\": 11.0,

\"Left\": 21.0,

\"Width\": 194.0,

\"Height\": 110.0,

\"ViewDirection\": 2,

\"PrintScale\": 0.0,

\"Fit\": false,

\"UseCommonScale\": true

},

{

\"Top\": 11.0,

\"Left\": 215.0,

\"Width\": 194.0,

\"Height\": 110.0,

\"ViewDirection\": 3,

\"PrintScale\": 0.0,

\"Fit\": false,

\"UseCommonScale\": true

},

{

\"Top\": 121.0,

\"Left\": 21.0,

\"Width\": 194.0,

\"Height\": 110.0,

\"ViewDirection\": 4,

\"PrintScale\": 0.0,

\"Fit\": false,

\"UseCommonScale\": true

}

]
```

}

\]

## Create a Link File with Excel

You can create link files in Excel. Simply include columns for **Condition**, **Link**, and **Name**. In the **Condition** column, you can use any attribute. To select all objects, use `*` as a wildcard, for example `Task=*`.

**Example:**

<table>
<tr><th>Condition</th><th>Link</th><th>Name</th></tr>
<tr><td>

Task=Piping

</td><td>

https://www.caxperts.com/

</td><td>

Homepage

</td></tr>
<tr><td>

Task=Structure

</td><td>

https://en.wikipedia.org/wiki/Structure

</td><td>

Wikipedia

</td></tr>
</table>

## Report Definition Files

<table>
<tr><td>

<img src="./media/ButtonReport.png" width="44" height="44">

</td><td>

After clicking **Create a report** in **File management**, you can choose a report definition file or create a new report. Report definition files are Excel files that must be stored in the `Data` folder of your UDiTH directory. By default, saved reports follow this naming convention:

</td></tr>
</table>

> `Report name (1)_YYYY-MM-DD_HH_MM`

<img src="./media/image182.png" width="721" height="109">

A report definition file can contain the following columns:

<table>
<tr><td>

Name

</td><td>

A descriptive name for your report.

</td></tr>
<tr><td>

Description (optional)

</td><td>

Additional description explaining the purpose of the report.

</td></tr>
<tr><td>

Filter (optional)

</td><td>

You can use all attributes including custom attributes.

</td></tr>
<tr><td>

Scope (optional)

</td><td>

Choose "All", "Selected" or "Visible".

</td></tr>
<tr><td>

Column (optional)

</td><td>

The attribute column that should be used for sorting your report.

</td></tr>
<tr><td>

Sort (optional)

</td><td>

You can sort in **ascending (asc)** or **descending (des)** order. If no sorting order is specified, UDiTH sorts in ascending order. Example: `descending:Name`

</td></tr>
<tr><td>

Forbidden (optional)

</td><td>

Enter actions that you do not want to allow for your reports: **C** (customise), **F** (filter), **S** (save). Combine them using a comma or semicolon. Example: `C,F;S`

</td></tr>
<tr><td>

Attributes

</td><td>

The attributes that the report should contain. **Colour** returns the current colour, and **Count** returns the number of objects contained within that object. For example, a vessel with four nozzles has a count of five.

</td></tr>
</table>

