# IntelliPID Module

**IntelliPID** is a module for **UDiTH** (Universal Digital Twin Hub) that displays P&ID content, including attributes and project hierarchy. The content is created in two steps:

- Step 1 - create the P&ID input for UDiTH (`.upvp` file)

  - Export data from Smart P&ID with CAXperts [**AdapterForSpid**](https://help.caxperts.com/UDiTH%20Capture%20Station/AdapterForSpid)

  - Convert PDF P&IDs with CAXperts [**AdapterForPdfPid**](https://help.caxperts.com/UDiTH%20Capture%20Station/AdapterForPdfPid)

- Step 2 - create a session with [**UDiTH Builder**](https://help.caxperts.com/UDiTH%20Capture%20Station/Builder)

  - This can include P&ID information only
  - Or a full 3D model with advanced linking between the P&ID and the 3D model

## User interface

<img src="./media/IntelliPID3_image2.png" width=700 height=270>

The IntelliPID module interface is divided into the following areas:

- The central P&ID viewport where the P&IDs are displayed.

- The breadcrumb hierarchy (red), which is used to navigate the P&IDs by hierarchy.

- The left menu bar (blue), attached to the left edge of the screen.

- The right panel (green), which shows the Files panel, Attributes panel, or Advanced search. These panels can be rearranged and resized through the multi-window functionality.

- The tab bar (orange) at the bottom of the screen, showing 3D, open P&IDs, or documents.

More details about these areas and their integrated functions are provided in the following chapters.

## Left menu

The left menu is the main menu for UDiTH and provides access to the central functions available from all views.

## Search in Current IntelliPID
<img src="./media/IntelliPID3_image5.png" width=400 height=44>

<table>
<tr><td>

<img src="./media/IntelliPID3_image6.png" width="44" height="44">

</td><td>

The **Search in IntelliPID** button opens a search field, shown above, that searches the currently displayed P&ID for the entered string. The number of matches is shown to the right of the search string.
All matches containing the requested string are included. Wildcards are not supported.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image7.png" width="44" height="44">

</td><td>

The arrows to the right of the match count are used to navigate between the matches. The down arrow jumps to the previous match.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image7a.png" width="44" height="44">

</td><td>

The up arrow jumps to the next match.

</td></tr>
</table>

> This search function searches the _currently active_ P&ID **only**. For a global search, use [**Advanced search**](#advanced-search).

### Zoom and Control
<!-- |<img src="./media/IntelliPID3_image9.png" width="44" height="44"> | **Zoom by rectangle** will zoom the screen to the marked region on P&ID. -->
<table>
<tr><td>

<img src="./media/IntelliPID3_image8.png" width="44" height="44">

</td><td>

**Pan Mode** activates the panning function.
Alternatively, press and hold the middle mouse button, press and hold the mouse wheel, or, if neither is available, press the left and right mouse buttons simultaneously.
On mobile devices, swipe the screen with two fingers to pan.

</td></tr>
<tr><td>

</td><td>

**Zoom in or out** by using the mouse wheel or by pressing and holding the right mouse button and moving the mouse up or down.
On a touch screen, pinch apart to zoom in and pinch together to zoom out.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image9.png" width="44" height="44">

</td><td>

**Zoom by rectangle** zooms the screen to the marked region on the P&ID.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image10.png" width="44" height="44">

</td><td>

**Fit Page** centres the screen on the selected elements and zooms to fit them into the viewport. If no object is selected, the current P&ID is zoomed to fit into the viewport.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image11.png" width="44" height="44">

</td><td>

**Refresh Graphics** resets the current P&ID in the viewport to its original state.

</td></tr>
</table>

### Colourise Selected Objects
<table>
<tr><td>

<img src="./media/IntelliPID3_image15.png" width="44" height="44">

</td><td>

Users can change the display colour of selected objects by opening the colour menu. This menu is divided into four main sections, as shown below:

<img src="./media/IntelliPID3_image16.png" width=350 height=250>

</td></tr>
</table>

#### Colour Options
<table>
<tr><td>

<img src="./media/IntelliPID3_image17.png" width="44" height="44">

</td><td>

**Advanced colour selection** opens a pop-up menu for detailed colour selection, allowing the user to choose from the full RGB colour spectrum.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image18.png" width="44" height="44">

</td><td>

The **colour picker** allows the user to pick a colour from a 2D object and save it to **Custom colours**.
This can then be selected from the colour palette just like the standard colours.
When this feature is enabled, first click the object from which you want to take the colour, then select a custom colour square to assign the selected colour to it.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image19.png" width="44" height="44">

</td><td>

The **Clear style** button restores the assigned colour of the selected objects to the default colour defined when the model was created.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image20.png" width="44" height="44">

</td><td>

The **Reset all colours** button restores **all** assigned colours for **all** objects to the default colours defined when the model was created.

</td></tr>
</table>

#### Default Colours

The **Default colours** section provides a basic set of predefined colours that can be applied to the currently selected objects.

#### Custom Colours

Custom colours are defined by the user using the **Colour picker** function described above. Once defined, they can be used for colouring just like the standard colours.

#### Opacity Setting

The slider at the bottom changes the opacity. The leftmost position is fully transparent, while the rightmost position makes the selected objects fully opaque.

### P&ID navigation
<table>
<tr><td>

<img src="./media/IntelliPID3_image25.png" width="44" height="44">

</td><td>

**Go to P&ID** &ndash; When an OPC (off-page connector) is selected, clicking this button opens the linked P&ID or PIDSketch loaded in the Files tree.
The view then zooms to the corresponding OPC on the linked P&ID or PIDSketch.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image26.png" width="44" height="44">

</td><td>

**Close all IntelliPID tabs** &ndash; Closes all currently open P&IDs and removes them from the tab bar. All unsaved PIDSketches, markups, and colouring are discarded.

</td></tr>
</table>

### Tools menu
<table>
<tr><td>

<img src="./media/IntelliPID3_image27.png" width="44" height="44">

</td><td>

 The **Tools menu** contains some useful tools for visualization of IntelliPID content. When clicked, the menu opens to the right showing the contained tools:

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image28.png" width="44" height="44">

</td><td>

**Automatic labelling** &ndash; Places labels automatically on the currently displayed P&ID.
The labels are applied according to the automatic labelling settings if the objects contain one of the attributes defined in the [**Settings**](#settings) panel.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image29.png" width="44" height="44">

</td><td>

**Highlight linked objects** &ndash; Helps users identify objects that have been successfully linked to the 3D model.
For these objects, an intelligent link between the 3D model and the P&ID is active.

</td></tr>
</table>

### Custom attributes panel
<table>
<tr><td>

<img src="./media/IntelliPID3_image30.png" width="44" height="44">

</td><td>

The **Custom Attributes** button is visible only when custom attributes have been defined in a custom attributes definition file.
Further information about these files, including their creation and syntax, can be found in **Custom Attributes** in the chapter [**Custom settings**](#custom-settings).

</td></tr>
</table>

Custom attributes are user-defined attributes. They can be changed, stored, and reloaded at runtime. In the attributes panel, see [**Attributes panel**](#attributes-panel), custom attributes are displayed in yellow.

<img src="./media/IntelliPID3_image31.png" width=400 height=50>

The button opens a custom attributes panel in the right panel:

<img src="./media/IntelliPID3_image32.png" width=400 height=220>

#### Custom Attribute tool bar
<table>
<tr><td>

<img src="./media/IntelliPID3_image33.png" width="44" height="44">

</td><td>

**Export all changes** &ndash; Saves all data entered into custom attributes in a single `.xlsx` file together with the relevant information for the items to which the values are linked.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image34.png" width="44" height="44">

</td><td>

**Import all changes** &ndash; Loads previously saved custom attribute values from an `.xlsx` file back into the custom attributes.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image35.png" width="44" height="44">

</td><td>

**Send email** &ndash; Changes to the custom attributes are logged during the session. Clicking this button generates a list of changes and copies it to the clipboard.
A new email is then opened in your default email client. The default recipient and subject are defined in the `Meta` tab of `IntelliPIDattributes.xlsx`. See [**Custom settings**](#custom-settings) for more details.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image36.png" width="44" height="44">

</td><td>

**Show only active** &ndash; Custom attributes not used in the currently displayed P&ID are hidden from the list of used values for that P&ID and from the corresponding legend.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image37.png" width="44" height="44">

</td><td>

**Place legend** &ndash; Displays a legend with the corresponding custom attribute colour keys on the P&ID.
This legend can be moved by dragging it to any location on the P&ID. See the description of custom attribute CodeLists and legends below.

</td></tr>
</table>

<img src="./media/IntelliPID3_image39.png" width=400 height=180>

#### Custom Attribute Drop-down

This drop-down control allows the user to select from custom attributes with CodeList definitions. By default, none is selected, and the P&ID colouring remains unchanged.
When a CodeList custom attribute is selected, the objects in the P&ID are coloured according to their custom attribute values and the legend is displayed below.

#### Legend

The legend provides colour information for the custom attribute selected from the drop-down described above. Unused values can be hidden using **Show only active**.
The displayed values and their corresponding colours are shown in the placed legend.
The legend can be resized.

#### Settings
<table>
<tr><td>

<img src="./media/IntelliPID3_image40.png" width="44" height="44">

</td><td>

Opens the settings panel for UDiTH. Users can configure the main P&ID settings in all options containing `IntelliPID` in their description:
 <img src="./media/IntelliPID3_image41.png" width=600 height=280>

</td></tr>
</table>

<table>

<tr><th>Setting</th><th>Description</th></tr>
<tr><td>

**Color options**

</td></tr>     
<tr><td>

Highlight

</td><td>

Changes the highlight colour of selected elements.

</td></tr>   
<tr><td>

Selected elements

</td><td>

Changes the colour of selected elements.

</td></tr>   
<tr><td>

Sheet background

</td><td>

Changes the P&ID background colour.

</td></tr>   
<tr><td>

Background elements

</td><td>

Changes the colour of elements that are not linked to the 3D model.

</td></tr>   
<tr><td>

**General settings**

</td></tr> 
<tr><td>

Text offset

</td><td>

Changes the distance between element descriptions and the elements themselves.

</td></tr>   
<tr><td>

Use flat IntelliPID hierarchy

</td><td>

Changes the breadcrumb hierarchy from structured view to flat view.

</td></tr>   
<tr><td>

**Attribute options**

</td></tr>
<tr><td>

Select attributes for automatic labelling

</td><td>

Opens a selection window for choosing attributes for automatic labelling. To select an attribute, drag and drop it into the list on the right.

</td></tr>
<tr><td>

Configure priority attributes

</td><td>

Opens a selection window for choosing priority attributes. To select an attribute, drag and drop it into the list on the right.

</td></tr>
<tr><td>

Configure visible attributes

</td><td>

Defines the maximum number of attributes displayed in the tooltip that appears when you hover over an item.
Attributes that are not available are ignored.

</td></tr>
<tr><td>

**Legend Font size**

</td></tr>
<tr><td>

Font size

</td><td>

Changes the font size used in the P&ID legend.

</td></tr>
<tr><td>

Use default legend position

</td><td>

Enables the use of a default legend position, when one has been defined.

</td></tr>
<tr><td>

Use colorful legend names

</td><td>

The legend description names are coloured according to the legend content.

</td></tr>
<tr><td>

**UI options**

</td></tr>
<tr><td>

UI scale

</td><td>

Changes the scale at which all user interface (UI) elements are displayed.

</td></tr>
<tr><td>

Reset UI scale

</td><td>

Resets the UI scale to normal (factor 1).

</td></tr>
<tr><td>

Attribute font size

</td><td>

Changes the font size used for attributes in the panel on the right.

</td></tr>
<tr><td>

**P&ID Sketches**

</td></tr>
<tr><td>

Snap mode ON

</td><td>

Activates snap mode during PIDSketch mode. The snapping option can also be turned on or off using the hotkey `Ctrl+F` while PIDSketch edit mode is active.

</td></tr>
<tr><td>

**P&ID Grid options**

</td></tr>
<tr><td>

Show grid

</td><td>

Activates the grid on the IntelliPID canvas. The grid can also be turned on or off using the hotkey `Ctrl+G`.

</td></tr>
<tr><td>

Grid opacity

</td><td>

Modifies the intensity of the grid display.

</td></tr>
<tr><td>

Width value

</td><td>

Modifies the width of each cell on the grid.

</td></tr>
<tr><td>

Width unit

</td><td>

Selects the grid unit system (mm or inch).

</td></tr>
<tr><td>

Use dynamic width

</td><td>

Activates the predefined dynamic grid width. The user can select a width unit: fine, normal, or coarse.

</td></tr>
<tr><td>

**Expert Settings**

</td></tr>
<tr><td>

Align custom symbol leader lines automatically

</td><td>

Forces automatic connection of the leader line when a `connecteditemid` attribute exists.

</td></tr>
<tr><td>

Use objects center for leader line

</td><td>

Uses the centre of the object as the default connection point for the leader line of the custom symbol.

</td></tr>
</table>

#### Automatic Labelling Settings
<img src="./media/IntelliPID3_image42.png" width=400 height=350>

#### Priority Attributes Settings
Priority attributes are always displayed first in the attributes panel. This does not affect custom attributes.
Custom attributes are always displayed directly after the attribute to which they are attached by definition - see [**Custom Attributes**](#custom-attributes) in [**Custom settings**](#custom-settings).
If the item under the mouse pointer does not contain one of the selected priority attributes, the next available attribute is displayed instead.

<img src="./media/IntelliPID3_image43.png" width=400 height=350>

#### File management
<table>
<tr><td>

<img src="./media/IntelliPID3_image44.png" width="44" height="44">

</td><td>

Opens the Files panel. See [**Files panel**](#files-panel) for more details.

</td></tr>
</table>

#### Manual
<table>
<tr><td>

<img src="./media/IntelliPID3_image45.png" width="44" height="44">

</td><td>

**Open manual** &ndash; Opens the link to the manual on CAXperts Help.

</td></tr>                                       
</table>

## Right Panel
The right panel is a multi-purpose panel and its function varies depending on the context. The header section of the panel contains the following main views:

<img src="./media/IntelliPID3_image72.png" width=400 height=100>

It provides access to the following views and features, which are described in the following chapters:
- **Attributes panel**
- **Advanced search panel**
- **Files panel** (optional)

The panel tabs can be rearranged and resized through the multi-window functionality:

<img src="./media/IntelliPID3_image74.png" width=400 height=300>

### Advanced Search
In addition to **Search in Current IntelliPID**, UDiTH includes an advanced search function designed for working with both 3D models and 2D drawings. The results are displayed according to the attributes in which the string was found. The number shown after each attribute indicates the number of matching groups in that attribute, using the same colour for hard matches and grey for soft matches, as well as the number of affected P&IDs in blue. When an attribute is expanded, the matching groups are displayed as a list with the corresponding P&ID name shown in blue.

<img src="./media/IntelliPID3_image76.png" width=400 height=300>

### Attributes Panel

The **Attributes** tab is displayed by default at start-up. It contains all attribute information for the selected item or items provided during the building process, whether from the authoring system or the UDiTH SDK.

<img src="./media/IntelliPID3_image80.png" width=400 height=300>

## Files Panel
The Files panel is the central location for UDiTH files attached to the model. All sketches, markups, comments, views, and similar items are displayed in a tree structure that makes it easy to navigate through all attached files.

Although all nodes in the tree are always visible, there are some differences in file creation between 3D and IntelliPID. This chapter describes the IntelliPID-specific functions together with some general features of the Files tree. The three sections of the panel are:
- **Tool bar** &ndash; Tree editing and file operations
- **Model root** &ndash; The model root is always present and is the anchor for the tree structure.
- **Files tree** &ndash; Contains a hierarchical structure of the files attached to the model.

<img src="./media/IntelliPID3_image85.png" width=400 height=180>

### Files Tool Bar
#### File Creation
<table>
<tr><td>

<img src="./media/IntelliPID3_image86.png" width="44" height="44">

The file creation button is context-sensitive. Depending on the object selected when **Add** is clicked, different options are available. Newly created files are placed beneath the selected file in the hierarchy:

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image87.png">

</td><td>

<img src="./media/IntelliPID3_image88.png">

</td><td>

<img src="./media/IntelliPID3_image89.png">

</td></tr>
<tr><td>

**Model root is selected**

</td><td>

**Folder is selected**

</td><td>

**PIDSketch is selected**

</td></tr>
</table>

<table>
<tr><td>

<img src="./media/IntelliPID3_image90.png" width="44" height="44">

</td><td>

**Remove** &ndash; Deletes the currently selected node or object from the tree.
If the selected item is a folder, all files inside that folder are also deleted after a confirmation prompt:
<img src="./media/IntelliPID3_image91.png" width=400 height=130>

</td></tr>  
<tr><td>

<img src="./media/IntelliPID3_image92.png" width="44" height="44">

</td><td>

**Copy** &ndash; Copies the selected tree object. Works for `Folder` and `Markup`.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image124.png" width="44" height="44">

</td><td>

 **Undo** &ndash; Undoes the last change to the tree.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image125.png" width="44" height="44">

</td><td>

 **Redo** &ndash; Redoes the last undone change to the tree.

</td></tr>  
<tr><td>

<img src="./media/IntelliPID3_image94.png" width="44" height="44">

</td><td>

**Load** &ndash; Opens a file dialogue to select a UDiTH file to load.
The loaded file is appended to the Files tree hierarchy automatically. To replace the existing hierarchy, remove it first.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image95.png" width="44" height="44">

</td><td>

 **Save** &ndash; Opens the save options:

<img src="./media/IntelliPID3_image96.png">

</td></tr> 
</table>

#### Relevant Options for Saving in IntelliPID
<table>
<tr><td>

<img src="./media/IntelliPID3_image56.png" width="44" height="44">

</td><td>

**Save** &ndash; Tree elements can be selected individually for saving.
Disabling a folder object also disables all objects within that folder hierarchy.
Clicking **Save** opens a save dialogue in which you can choose the file name and location. The designated file type is `*.upvf`.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image33.png" width="44" height="44">

</td><td>

**Save config** &ndash; Saves the configuration to a UDiTH file. A configuration includes the following areas:

<img src="./media/IntelliPID3_image99.png" width=200 height=180>

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image100.png" width="44" height="44">

</td><td>

 **Export to PDF** &ndash; Opens a file save dialogue for saving IntelliPID P&IDs in PDF format. In order to export searchable PDFs (Windows only), it is necessary to install [**Inkscape 1.4.3**](https://inkscape.org/de/release/1.4.3/platforms/) (64-bit/.exe) on the same device. 
 Several PDF export options are available:

<img src="./media/IntelliPID3_image101.png" width=400 height=350>

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **As shown** &ndash; The P&ID will be exported as displayed, including selection highlighting and display styles.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **As modified** &ndash; The P&ID will be exported as displayed, selection highlighting and display style are ignored.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **Original** &ndash;  The P&ID will be exported in its original state, all coloring and sketching are ignored.

</td></tr>   
<tr><td>

                                                                   

</td><td>

 A P&ID name filter can be applied to the list of available P&IDs. Users get to select from this list using the following selection and export options:

</td></tr>   
<tr><td>

                                                                   

</td><td>

 **Manual selection** &ndash; Select P&IDs by clicking on the check box.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **With Sketches** &ndash; Selects all P&IDs in the project that have applied PIDSketches.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **Select current** &ndash; SSelects only the currently displayed P&ID.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **Select open** &ndash; Selects all P&IDs currently open (visible in the tab bar on the bottom).

</td></tr>
<tr><td>

                                                                   

</td><td>

 **Select all** &ndash; Selects all P&IDs in the project.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **Zip file**  Exports selected P&IDs to PDF in one zip file.

</td></tr> 
<tr><td>

                                                                   

</td><td>

 **Concat into single file** &ndash; Exports selected P&IDs into one single PDF binder.
 The drawing names will be exported as bookmarks to make navigation easier.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image102.png" width="44" height="44">

</td><td>

 **Filter selected files** &ndash; selects/unselects elements in a files tree by their type:

<img src="./media/IntelliPID3_image103.png" width=200 height=250>

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image105.png" width="44" height="44">

</td><td>

 **Select display style** &ndash; Opens a pop-up menu for display style selection.
 The model is loaded with a default color file, but additionally, users can load coloring settings depending on attribute conditions defined in color files.

<img src="./media/IntelliPID3_image106.png" width=200 height=250> 
 <img src="./media/IntelliPID3_image107.png" width=200 height=150>

</td></tr>
</table>

Depending on the settings in the \'upvcolorindex.txt\' file, a list of custom display styles will be displayed.
Files not listed can be opened directly from the file system by clicking **Open local file**.

If a **color group** display style is selected, the user can choose which color group to enable.
In addition, it is possible to apply a single or multiple color system to P&IDs and export the P&IDs to a concatenated PDF according to their color system by clicking the 'PDF Export (Single System)' button. 

Users can create custom color files using Excel by entering a color and condition. For more details on the settings and definitions, refer to the [**Color Files**](#color-files) section of the [**Custom settings**](#custom-settings) chapter.

<table>
<tr><td>

<img src="./media/IntelliPID3_image109.png" width="44" height="44">

</td><td>

 **Load link file** &ndash; Opens a file system dialogue to load a link file (.xlsx).
 You can replace existing links or append the existing links with new ones. For more details about the formatting and definition of links, see [**Link Mapping Files**](https://help.caxperts.com/UDiTH%20App/Appendix%20-%20Custom%20settings%20files#link-mapping-files).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image110.png" width="44" height="44">

</td><td>

 **Set current legend position as default legend position** &ndash; This option sets a current P&ID legend position and size displayed in IntelliPID as the default legend position for all other P&IDs in the current session and can be also stored to default.upvf, if required.

</td></tr>
</table>

### File and object types

In IntelliPID, there are several file types available in the Files tree:

<table>
<tr><td>

<img src="./media/IntelliPID3_image112.png" width="44" height="44">

</td><td>

 **Folder** &ndash; Adds a Folder object to the Model root. Subfolder are also supported. In folders, all other types of files can be stored in and thereby grouped.
 For multiple files to one P&ID, for example, users can create a folder that contains all relevant files for that P&ID.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image113.png" width="44" height="44">

</td><td>

 **AppControl** &ndash; Creates a new "AppControl" For more details, see the general chapter [**AppControl**](https://help.caxperts.com/UDiTH%20App/AppControls).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image114.png" width="44" height="44">

</td><td>

 **Markup** &ndash; The markup file enables you to do markups on your P&IDs, including graphical objects. For detailed information, see the following chapter [**P&ID Markup**](#pid-markup).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image115.png" width="44" height="44">

</td><td>

 **PIDSketch** &ndash; The sketch file enables you to add sketches to your P&ID, including you custom P&ID symbols. For detailed information, see the chapter [**P&ID Sketch**](#pid-sketch).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image50.png" width="44" height="44">

</td><td>

 **Report** &ndash; This opens the report creation dialogue. Predefined custom and ad-hoc reports can be generated here. For more details, see the chapter [**Reporting**](#reporting).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image116.png" width="44" height="44">

</td><td>

 **Comment** &ndash; The commenting object contains one comment per node. Comments can be attached to any P&ID element, original or sketch.
 Commenting objects are always dependencies of a P&ID Sketch object. For more details, see the Chapter [**P&ID comment**](#pid-comment).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image120.png" width="44" height="44">

</td><td>

 **Window Layout** &ndash; Enables saving and loading of customizable layout or predefined startup views for each UDiTH instance.

</td></tr>
</table>

### Context buttons

All objects have context buttons to the right of the file/object node. Depending on the file/object type, different functions are available.
They become visible when the user moves the mouse over the corresponding node or clicks on the object.

#### Context controls
<table>
<tr><td>

<img src="./media/IntelliPID3_image116.png" width="44" height="44">

</td><td>

 **Edit** &ndash; Opens the according file in edit mode. An editor panel is shown in the right panel depending on the file type selected.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image118.png" width="44" height="44">

</td><td>

 **Show/Hide** &ndash; Shows or hides the according file/object in the viewport.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image138.png" width="44" height="44">

</td><td>

 **Show/Hide** **Comment line** &ndash; Shows or hides the leader line of the comment.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image158.png" width="44" height="44">

</td><td>

 **Select** &ndash; Selects and highlights sketch items on a selected PIDSketch. Useful for multi-sketch drawings.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image165.png" width="44" height="44">

</td><td>

 **Apply at startup** &ndash; This toggle activates automatic loading of the customized window layout on every startup of the UDiTH model.

</td></tr>
</table>

## P&ID Markup
<table>
<tr><td>

<img src="./media/IntelliPID3_image114.png" width="44" height="44">

</td><td>

 The Markup function in IntelliPID is a tool that enables the creation of graphical and textual markups for P&ID (see section [**Files tool bar**](#files-tool-bar) in the chapter [**Files panel**](#files-panel)).

</td></tr>
</table>

The P&ID becomes a virtual whiteboard on which the markup function can be used to draw without altering the underlying graphics. Several markups can be created on one drawing and visualized simultaneously. 

After assigning a name, an editor panel opens at the bottom of the right panel:

<img src="./media/IntelliPID3_image122.png" width="400" height="200">

### Tool bar
<table>
<tr><td>

<img src="./media/IntelliPID3_image123.png" width="44" height="44">

</td><td>

 **Show initial screenshot** &ndash; Shows a screenshot of the P&ID before Markup was applied.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image121.png" width="44" height="44">

</td><td>

 **Show last saved screenshot** &ndash; Shows a screenshot of the P&ID in the state when editing was started. This includes Markups made previously.

</td></tr>                    
<tr><td>

<img src="./media/IntelliPID3_image124.png" width="44" height="44">

</td><td>

 **Undo** &ndash; Undoes the last action taken in Markup.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image125.png" width="44" height="44">

</td><td>

 **Redo** &ndash; Redoes the last undone action.

</td></tr>
</table>

### Drawing tools
<table>
<tr><td>

<img src="./media/IntelliPID3_image126.png" width="44" height="44">

</td><td>

 **Draw free line** &ndash; Creates a freehand line following mouse or finger movement in all directions.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image127.png" width="44" height="44">

</td><td>

 **Draw straight line** &ndash; Creates a straight line in the direction of mouse or finger move.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image128.png" width="44" height="44">

</td><td>

 **Draw orthogonal line** &ndash; Creates an orthogonal line bound to X and Y axis.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image129.png" width="44" height="44">

</td><td>

 **Draw rectangle** &ndash; Draws a rectangle. Size is defined by mouse or finger movement.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image130.png" width="44" height="44">

</td><td>

 **Draw oval** &ndash; Draws an oval. Size is defined by mouse or finger movement.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image131.png" width="44" height="44">

</td><td>

 **Draw text** &ndash; Creates a text field at the position where the mouse is clicked.
 Font size and color are defined by the pen definition. If an existing text is picked, this text can be edited.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image132.png" width="44" height="44">

</td><td>

 **Move** &ndash; Enables you to move the currently selected element in any direction on the P&ID.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image133.png" width="44" height="44">

</td><td>

 **Erase** &ndash; The erase tool erases graphically the positioned markups.
 It does not delete coherent objects but rather those parts the tool is swiped over, resembling a sponge.

</td></tr>
</table>

### Pen templates
A pen template sets the drawing pen to a fixed size and color. The last template (yellow color) is transparent.

### Pen definition
The pen definition is used to set the size, color, and transparency of the pen.

## P&ID sketch

<table>
<tr><td>

<img src="./media/IntelliPID3_image115.png" width="44" height="44">

</td><td>

The P&ID Sketch feature allows users to sketch into existing P&IDs. Sketches are applied to a separate layer and do not modify the original document.</tr>
</table>

P&ID Sketching provides preset objects as well as access to a custom catalog. To create a PIDSketch, please refer to the [**Files tool bar**](#files-tool-bar) section in the [**Files panel**](#files-panel) chapter.
After assigning a name to the created PIDSketch, an editor panel opens at the bottom of the right panel:

<img src="./media/IntelliPID3_image135.png" width=400 height=150>

### Tab Selector
The Tab Selector allows users to toggle between the P&ID sketch functions, 2D catalog, sketch labels and sketch items presented on the P&ID Sketch.

### PIDSketch Name
PIDSketch name shows the name of the currently open/edited P&ID sketch and the corresponding P&ID number/title in parentheses.

### Tool bar

<table>
<tr><td>

<img src="./media/IntelliPID3_image124.png" width="44" height="44">

</td><td>

 **Undo** &ndash; Undoes the last action taken in PIDSketch.

</td></tr>                   
<tr><td>

<img src="./media/IntelliPID3_image125.png" width="44" height="44">

</td><td>

 **Redo** &ndash; Redoes the last undone action in PIDSketch.

</td></tr>                   
</table>

### Sketching tools
The Sketching Tools include the following presets and typicals for 2D sketching:

<table>
<tr><td>

<img src="./media/IntelliPID3_image137.png" width="44" height="44">

</td><td>

 **Routing** &ndash; Starts a line routing process to sketch orthogonal lines. To finish routing, click or tap the button again or use the right mouse button.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image138.png" width="44" height="44">

</td><td>

**Free Routing** &ndash; Starts a line routing process to sketch lines at a defined angle (default is 45°).
 To finish free routing, click or tap the button again or use the right mouse button. To resume free routing, hold the Ctrl button and click one end of the line.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image126.png" width="44" height="44">

</td><td>

**Free Hand** &ndash; Creates a freehand line following mouse or finger movement in all directions. To finish routing, click or tap the button again or use the right mouse button.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image127.png" width="44" height="44">

</td><td>

**Polyline** &ndash; Creates a straight line in the direction of the mouse clicks. To finish routing, click or tap the button again or use the right mouse button.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image130.png" width="44" height="44">

</td><td>

**Circle** &ndash; Places a circular typical, e.g. for pumps. When placed, the line (original and sketch) it is placed upon will be interrupted to fit in the symbol.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image129.png" width="44" height="44">

</td><td>

**Rectangle** &ndash; Places a rectangular typical, e.g. for measurements, indicators, etc.
 When placed, the line (original and sketch) it is placed upon will be interrupted to fit in the symbol.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image141.png" width="44" height="44">

</td><td>

**Valve** &ndash; Places a general valve typical. When placed, the line (original and sketch) it is placed upon will be interrupted to fit in the symbol.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image142.png" width="44" height="44">

</td><td>

**Revision Cloud** &ndash; Starts a freehand line routing process to sketch a revision cloud.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image131.png" width="44" height="44">

</td><td>

**Text** &ndash; Creates a text field at the position where the mouse is clicked. The text value, font, size and individual color can be defined in the text attributes.

</td></tr>
</table>

### Commands

<table>
<tr><td>

<img src="./media/IntelliPID3_image143.png" width="44" height="44">

</td><td>

 **Break line** &ndash; Breaks the selected line and creates a separate segment between inline components.
For breaking a straight line into two segments, an object needs to be placed first. 
 First click on the point you want the break to be placed, then click the Break line function.
 Depending on the positioning on the line the break will be applied to the closest end to clicked point: 
<img src="./media/IntelliPID3_image152.png" width="600" height="55">

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image153.png" width="44" height="44">

</td><td>

 **Un Break line** &ndash; Removes the selected line breaks.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image154.png" width="44" height="44">

</td><td>

 **Copy** &ndash; Creates a copy of the selected object (works for original and sketch items).
 The copy is attached to the mouse position and can be placed by clicking on the destination position.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image155.png" width="44" height="44">

</td><td>

 **Rotate** &ndash; Rotates or mirrors the selected sketch item or a selection of sketch items.Active rotation command is symbolized by the rotation symbol in the center of the sketch item. 
 The rotation commands are activated by clicking/tapping the respective symbol and

</td></tr>   
<tr><td>

<img src="./media/IntelliPID3_image156.png" width="44" height="44">

</td><td>

 **45° Rotation symbol** &ndash; rotates the sketch item in 45° increments. 
 **Rotation symbol** &ndash; rotates the sketch item freely. 
 **Mirror symbol** &ndash; Flips the symbol axially in the dragged direction.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image157.png" width="44" height="44">

</td><td>

 **Change layer color** &ndash; Opens a default color selection pop-up (see section **Colorize selected objects** in the Chapter [**Left menu**](#left-menu)).
 The color is applied to all sketch items in the current sketch layer.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image174.png" width="44" height="44">

</td><td>

 **Hide Objects** &ndash; Hides the selected objects on the drawing.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image179.png" width="44" height="44">

</td><td>

 **Show Hidden Objects** &ndash; Shows hidden objects on the drawing (from hidden layer).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image36.png" width="44" height="44">

</td><td>

 **Unhide Objects** &ndash; Unhides all objects from hidden layer.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image175.png" width="44" height="44">

</td><td>

 **Sub Area Colorize Mode** &ndash; When activated, the existing fill color of the objects can be changed.

</td></tr>
<tr><td>

**Hotkey**

</td><td>

 **Copy & Paste** &ndash; Within UDiTH: Press "Ctrl+C" to copy elements. Press "Ctrl+V" to insert the copied elements from the clipboard into the same PIDSketch, another PIDSketch or a new PIDSketch on another drawing.

</td></tr>
<tr><td>

**Hotkey**

</td><td>

 **Snap Mode ON/OFF** &ndash; Press "Ctrl+F" to toggle snap mode on/off while being in PIDSketch edit mode.

</td></tr>
<tr><td>

**Hotkey**

</td><td>

**Show Grid ON/OFF** &ndash; Press "Ctrl+G" to show grid on/off.

</td></tr>
</table>

### Sketch attributes
Simple sketch items possess only a few attributes by default. The default attribute NAME can be directly changed in the attributes panel while PIDSketch is in edit mode. Just click into the value of the NAME attribute to change it:

<img src="./media/IntelliPID3_image162.png" width=600 height=100>

If more attributes are needed, they can be added as necessary in the lower part of the attributes:

<img src="./media/IntelliPID3_image163.png" width=600 height=100>

Enter the fields marked with "Enter text..." and type in you new attribute name on the left and the according new value on the right (green fields). To confirm the new attribute hit Enter or click on the Add Attribute button (marked red).
The new attribute will appear in the attribute list. If you wish to remove the attribute, click on "delete" symbol

><img src="./media/IntelliPID3_image90.png" width="44" height="44">

The attribute will be deleted then.

The custom and changeable attributes can be predefined in the **intelliPidAttributes.xlsx.** Please see the chapter [**Custom Attributes**](#custom-attributes).

#### Attribute "Style"
Different styles are available (depending on the sketch item) and can be selected from the attribute dropdown menu. The available styles for routing are:

<img src="./media/IntelliPID3_image178.png" width=400 height=300>

<table>
<tr><th>Example</th><th>Style</th></tr>
<tr><td>

<img src="./media/IntelliPID3_image180.png" width=100 height=15>

</td><td>

 Normal

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image181.png" width=100 height=15>

</td><td>

 Dashed

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image182.png" width=100 height=15>

</td><td>

 DashedDotLine

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image183.png" width=100 height=10>

</td><td>

 DashedDotLine2

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image184.png" width=100 height=15>

</td><td>

 FlexibleHose

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image185.png" width=100 height=30>

</td><td>

 HatchedAreaLarge

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image186.png" width=100 height=15>

</td><td>

 HatchedAreaSmall

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image187.png" width=100 height=10>

</td><td>

 HeatTracing

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image188.png" width=100 height=10>

</td><td>

 Jacketed

</td></tr>
</table>

#### Attribute "Width"
There are different width factors available for simple sketch items and copied items, which can be selected from the attribute dropdown menu called "Width".

<img src="./media/IntelliPID3_image159.png" width=600 height=300>

#### Attribute "Color"
Individual colors can be applied to selected sketch items via the color attribute. The default setting is "By Layer", indicating that the specified PIDSketch color will be applied. The "By Layer" color can be modified individually for each sketch element in the current PIDSketch:

<img src="./media/IntelliPID3_image160.png" width=400 height=400>

The individual color can be restored to its "By Layer" state by selecting the "Reset color of selected objects" button: 

><img src="./media/IntelliPID3_image19.png" width="44" height="44"> 

### Catalogue
The catalogue contains a collection of custom sketching symbols for IntelliPID sketching. It allows users to add custom P&ID sketching symbols to IntelliPID, enabling users to extend the sketching abilities and adapt sketching fully to their needs.
When loading a model, UDiTH checks for a upvintellipidsketchitems.txt file located in the \Data\ folder of the model. This file contains the linkage to all available items for the current model.
For more details about the sketch items list file and how to add your own custom symbols, see section [**Sketch item index file**](#sketch-item-index-file) in the chapter [**Custom settings**](#custom-settings-files).

<img src="./media/IntelliPID3_image164.png" width=300 height=400>

### Labels
In the tab labels, users can select predefined labels and place them on the sketching objects. The attributes of the label are inherited by the sketching objects. These label attributes can be directly modified either on the sketch item itself or on the label.

<img src="./media/IntelliPID3_image176.png" width=400 height=250>

The labels can be predefined in the **IntelliPIDattributes.xlsx** in the tab "LabelDefinition". Please see the chapter [**Worksheet "LabelDefinition**](#worksheet-labeldefinition).

### Sketch Items
In the tab sketch items all the existing sketch elements on the current PIDSketch are listed and can be also selected.

<img src="./media/IntelliPID3_image177.png" width=400 height=180>

## P&ID comment

<table>
<tr><td>

<img src="./media/IntelliPID3_image116.png" width="44" height="44">

</td><td>

 Create a comment for the currently selected P&ID object. The comment will attach to the centre of the object with a leader line. 
 The leader line can be shown or hidden respectively &ndash; for further details, see section [**Context buttons**](#context-buttons) in the chapter [**Files panel**](#files-panel).

</td></tr>
</table>

The name of the comment in the Files tree is identical to the comment content. Comments can be altered by either changing the name in the Files tree or by double click on the comment in the viewport. While the first is helpful for short comments, the editing in viewport allows multiline input.

## Reporting

UDiTH includes a powerful yet easy-to-use reporting engine. The report creation dialogue is opened by the corresponding button in the [**Files panel**](#files-panel) within the [**Right panel**](#right-panel).

### Report Creation Dialogue
<img src="./media/IntelliPID3_image54.png" width=300 height=300>

The report creation dialogue shows a list of predefined reports. These are defined in the Excel file `IntelliPidReportDefinition.xlsx`.
For more details about predefined reports, see [**Report definitions**](#report-definitions) in the chapter [**Custom settings**](#custom-settings).

Selecting a report definition opens the report results page, where additional filters can then be applied.
Two buttons are shown next to each report definition:

<table>
<tr><td>

<img src="./media/IntelliPID3_image55.png" width="44" height="44">

</td><td>

**Report Settings** &ndash; Opens the Report Editor and allows you to modify the predefined report definition.
For more details, see [**Report editor**](#report-editor) below.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image56.png" width="44" height="44">

</td><td>

**Save Report** &ndash; Opens the save dialogue directly. You can save the report result as an `.xlsx` or `.csv` file for further use outside UDiTH.

</td></tr>
</table>

If none of the available report definitions is suitable, click **New** to open the Report Editor.

### Report Editor
The Report Editor helps you create reports easily:

- Select whether you want to include sketch data and attributes assigned to sketch items.

> Currently, report generation for PIDSketch data can be performed for a maximum of the last **five** opened P&ID drawings.

- Choose the scope you want to report on. `All elements` includes all elements in the model.
- Select the attributes you want to report on by dragging them to the right.

<img src="./media/IntelliPID3_image57.png" width=400 height=300>

- The **Reset** button clears the **Selected attributes** table. All other settings remain unchanged.
- Clicking **OK** generates the report and displays the **Report Results** view.

### Report Results
The report results are displayed in the **Report Results** screen. The screen is divided into the **Report Menu** on the left and the results grouped by attributes.
You can select multiple results by holding down the **Ctrl** key while clicking the lines:

<img src="./media/IntelliPID3_image58.png" width="400" height="170"> 

#### Report Menu
The report menu contains functions that help you narrow down the results, locate items on the P&ID, or export the results:

<table>
<tr><td>

<img src="./media/IntelliPID3_image11.png" width="44" height="44">

</td><td>

**Reload Report** &ndash; Updates the report, for example if custom attributes have changed.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image10.png" width="44" height="44">

</td><td>

**View in model** &ndash; Highlights the selected items in the corresponding P&IDs. If the P&IDs are not already open, they are opened automatically and shown in the tab bar.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image61.png" width="44" height="44">

</td><td>

**Select underlying objects** &ndash; This function currently provides the same result as **View in model**.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image92.png" width="44" height="44"> 

</td><td>

**Copy current report definition** &ndash; Copies the current report definition to the clipboard so that it can be saved in the report definition file.
For more details, see [**Report definitions**](#report-definitions) in [**Custom settings**](#custom-settings).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image116.png" width="44" height="44">

</td><td>

**Customise Report Settings** &ndash; Opens the Report Editor and allows you to modify the current report definition.
For more details, see [**Report editor**](#report-editor).

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image56.png" width="44" height="44">

</td><td>

**Save Report** &ndash; Opens the save dialogue directly. You can save the report result as an `.xlsx` or `.csv` file for further use outside UDiTH. The button is available via the save options in the right panel.

</td></tr>
<tr><td>

<img src="./media/IntelliPID3_image62.png" width="44" height="44">

</td><td>

**Toggle quick filter** &ndash; Toggles the quick filter to narrow down report results.
When activated, another line is shown below the attribute names. Wildcards can be used:
<img src="./media/IntelliPID3_image63.png" width="400" height="50"> 
The line consists of a filter string field and two additional buttons:
<img src="./media/IntelliPID3_image64.png" width="40" height="30"> **Hide/show exclusive clauses** &ndash; Allows additional filters to be set for showing or hiding exactly defined values, and shows the current number of values set.
<img src="./media/IntelliPID3_image65.png" width="40" height="30"> **Clear filter** &ndash; Clears and resets all filters.

</td></tr> 
<tr><td>

<img src="./media/IntelliPID3_image66.png" width="44" height="44">

</td><td>

**Filter combine mode** &ndash; If several filters are set, they are combined with an **OR** operator by default, which means that only one filter condition must be true.
If you switch to **AND**, all filter conditions must be fulfilled for the item to be listed.

</td></tr>
</table>

#### Right-click Filter

To narrow down results further, you can also right-click, or long-tap, an attribute value in the result list. A pop-up appears that allows you to show or hide the selected values exclusively:

<img src="./media/IntelliPID3_image67.png" width="200" height="50">

All lines with the corresponding values are then either shown or hidden in the results list.

#### Custom Attribute Editing
If multiple lines are selected and a custom attribute with a CodeList is included in the report, it can be changed in bulk for all selected items:

<img src="./media/IntelliPID3_image68.png" width="200" height="120">|<img src="./media/IntelliPID3_image69.png" width="200" height="120">|<img src="./media/IntelliPID3_image70.png" width="200" height="120">

> *There is a limit of about 20 elements per row. The number of elements can be checked by adding a special attribute "count" in the report editor. For even more detailed reporting and advanced reporting features, use CAXperts [UniversalReporter](https://www.caxperts.com/universalreporter/).*

## Custom Settings

UDiTH uses a range of files that can be used to customise the content and options available in the software itself.
The following sections describe the different file types.

### Autostart Files

UDiTH automatically considers several default and settings files during start-up.
For this to work, the files must be named exactly as shown in the list below:

<table>
<tr><th>Location</th><th>Name</th><th>Function</th></tr>
<tr><td>

.\\Data\\

</td><td>

Links.xlsx

</td><td>

Linking file for external links and documents.

</td></tr>
<tr><td>

.\\Data\\

</td><td>

IntelliPidAttributes.xlsx

</td><td>

Definition of custom attributes to be used in IntelliPID.

</td></tr>
<tr><td>

.\\Data\\

</td><td>

IntelliPidAttributedata.xlsx

</td><td>

Custom attribute values for IntelliPID to be loaded on UDiTH startup.

</td></tr>
<tr><td>

.\\Data\\

</td><td>

IntelliPidReportDefinition.xlsx

</td><td>

Definition of reports and their filters for IntelliPID.

</td></tr>
<tr><td>

.\\Data\\colorfiles\\

</td><td>

upvcolorindex.txt

</td><td>

Listing of the default display styles to be listed in the Display Style Selection in the UDiTH [**Load display style**](#display-styles) menu.

</td></tr>
<tr><td>

.\\Data\\

</td><td>

upvintellipidsketchitemindex.txt

</td><td>

Lists all catalogue items to be shown in IntelliPID Sketching.

</td></tr>
</table>

### Link Mapping Files

There are three ways to add links to your UDiTH model:

- During the building process through a link mapping file
- Automatically load a link mapping file on start-up (`Links.xlsx` in the `\Data\` folder of the model)
- Loading a link mapping file (see section **File panel** of the chapter [**Right panel**](#right-panel)).

All three methods use the same type of definition in the form of an Excel link mapping file:

<img src="./media/IntelliPID3_image167.png" width="600" height="80">

**Link** &ndash; 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 containing the `Data` folder.

**Condition** &ndash; The condition can be any filter, including wildcards, that relates to an attribute in UDiTH.

**Name** &ndash; The name is the display name of the link. This is the text shown in the Attributes panel in UDiTH.

**Color** &ndash; The colour setting 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**.

### Custom Attributes

Custom attributes are user defined attributes that can be altered before each launch of UDiTH. Their values can be changed at runtime (except calculation attributes). 
The Custom Attributes for IntelliPID are defined in the file **IntelliPidAttributes.xlsx**
This file can contain six worksheets (tabs):
- **Definition**
- **Codelist**
- **Filter**
- **Meta**
- **SketchDefinition**
- **LabelDefinition**

#### Worksheet "Definition"
In this worksheet, the custom attributes are defined:

<img src="./media/IntelliPID3_image168.png" width="600" height="100">

**Id** &ndash; The Id of the custom attribute can be any number. The only condition is that an Id must be unique throughout the complete custom attributes list. This Id is later used for value assignment.

**Name** &ndash; The displayed name of the attribute in UDiTH.

**SourceAttribute** &ndash; The attribute the custom attribute "attaches" itself to. E.g., SP_ID generates many entries since it attaches itself to any object with the attribute SP_ID. 
 This may influence the performance of UDiTH. It is highly recommended to use "SourceAttribute" as specific as possible.

**Filter** &ndash; Sets a filter to assign the custom attributes only to objects covered by the filter. A filter can be directly entered here (row 5), wildcards are valid. Instead, a predefined filter can be set (worksheet "Filter").

> *Please note that filters are applied sequentially. When the same filter is run several times in a definition, the according query will be executed several times. This can influence performance negatively. Instead, use predefined filters*.

**DataType** &ndash; The data type defines which properties an attribute will have. There are three basic types:

- **Calculation** &ndash; Defines a value that will be calculated on UDiTH launch. This is the only custom attribute that cannot be altered during runtime. For IntelliPID, only the calculation HasLink is available (DefaultValue "ThreeD" is mandatory) that gives back a Boolean if the object exists in 3D.

- **Freetext** &ndash; Defines a freely editable text attribute during runtime. Accepts all value strings.

- **Codelist** &ndash; Defines a codelist attribute. In UDiTH, these attributes are displayed as a combo box, enabling you to choose from a predefined codelist of values -- see worksheet "Codelist".

**DefaultValue** -- The value that will be assigned to the custom attribute automatically without any manual assignment being necessary. Depending on the DataType, there are different options available:

- **For Calculation** &ndash; Only DefaultValue "ThreeD" is available.

- **For Freetext** &ndash; can be left blank or contain any string.

- **For Codelist** &ndash; The default value should be a value listed in the codelist definition.

**Parameter1** &ndash; This parameter gives additional parameters, depending on the DataType of the attribute:

- **For Calculation** &ndash; Only parameter "HasLink" is available.

- **For Freetext** &ndash; not used

- **For Codelist** &ndash; The name of the codelist to use, see worksheet "Codelist"

**Id** &ndash; The Id of the custom attribute can be any number. The only condition is that an Id must be unique throughout the complete custom attributes list. This Id is later used for value assignment.

#### Worksheet "Codelist"
In this worksheet, the codelists for the custom attributes are defined:

<img src="./media/IntelliPID3_image169.png" width="600" height="190">

- **Name** &ndash; The name of the codelist. This is the Name used in Parameter1 on worksheet "Definition"

- **Value** &ndash; defines all values available for the codelist in column A (Name)

- **Color** &ndash; defines the color the respective value will be shown in in UDiTH. This also affects the color used in the legend. It can be either a hexadecimal RGB color definition preceded by a **\#** or one of the Excel default colors in clear name notation: **black, white, red, green, blue, yellow, magenta, and cyan**.

- **Line_Width_Factor** &ndash; modifies the line width of the P&ID objects by a factor. Factor 1 means no change to the line width.
- **MarkUp** &ndash; allows line highlighting of the P&ID objects. Transparency is controlled by the last two digits in the “Color” column and the width factor by the digit in the "Line_Width_Factor" column.

<img src="./media/IntelliPID3_image161.png" width="600" height="350">

#### Worksheet "Filter"
In this worksheet, often used filters for the custom attribute definition can be set:

Filters entered in the worksheet "Definition" are always executed separately, even if the contents of the filter strings are identical. This can slow down the loading of the custom attributes on UDiTH launch.

Instead, you can use the worksheet "Filter" to define a referenced filter. Filters defined here are run only once, no matter how often they are invoked on the worksheet "Definition". Whereas a direct filter runs every single time it is invoked, using the predefined filter reuses the result of the filter, thus increasing the performance of custom attributes loading.

<img src="./media/IntelliPID3_image170.png" width="600" height="60">

- **Name** &ndash; The unique name of the filter to be used as reference in the tab "Definition". This name can be freely assigned.

- **Filter** &ndash; The actual filter string. Wildcards are allowed. 

#### Worksheet "Meta"

In this worksheet, the parameters for the mailing of custom attribute changes can be defined:

<img src="./media/IntelliPID3_image171.png" width="600" height="80">

For IntelliPID, there are two keys available:

- **WorkcardMail_To** &ndash; the recipient or list of recipients for the list of custom attribute changes.

- **WorkcardMail_Subject** &ndash; the subject automatically added to the mail generated.

#### Worksheet "SketchDefinition"

In this worksheet, the changeable or read-only attributes can be defined for sketch items:

<img src="./media/IntelliPID3_image189.png" width="600" height="250">

- **Name** &ndash; The name of the attribute to be displayed on a sketch item.
- **Filter** &ndash; The name of the predefined filter from the worksheet "Filter". When a filter is set, the attributes will be applied to the sketch items defined in it.
- **DataType, DefaultValue, Parameter1** &ndash; Please refer to the description in the chapter [**Worksheet "Definition**](#worksheet-definition). 
- **ReadOnly** &ndash; True: attribute is read-only. False: attribute is changeable during runtime. 

#### Worksheet "LabelDefinition"

This worksheet allows admins to predefine different labels for sketch items. Labels can contain multiple entries, such as pipeline number. The order of the individual strings of one label corresponds to the order in the Excel rows:

<img src="./media/IntelliPID3_image190.png" width="600" height="350">

<img src="./media/IntelliPID3_image176.png" width=300 height=200>

- **Label_Name** &ndash; The displayed label name in the PIDSketch tab "Labels".
- **Entry_Type** &ndash; Attribute: The entry will be treated as an attribute with a changeable value. Codelist: The entry will be treated as a codelist attribute. Const: A fixed entry in the label string.
- **Entry_Name** &ndash; Attribute: The name for the displayed attribute. Codelist: The name for the codelist defined in the worksheet "Codelist". Const: Fixed text entry or line break operator "\
" to create a multi-line label.  
- **Default_Value** &ndash; Attribute, Codelist: The default value for the displayed attribute.
- **Font** &ndash; Specifies the system font to be used for the label.
- **Font_Size** &ndash; Specifies the font size to be used for the label.

### Report definitions

To define a report that will be listed in the report selection list, the file IntelliPidReportDefinition.xlsx is used. There are two ways to create a new report definition:

#### Definition by copy

Create a new report and in the **Report Results** screen use the **Copy current report definition** function. This will copy the current report definition to the clipboard.
Then paste the content of the clipboard to the next free row in the report definition file.

#### Manual definition
You can also create a report definition manually by editing the report definition file directly:

<img src="./media/IntelliPID3_image172.png" width="600" height="100">

There are the following fields used to define a custom report. The fields highlighted are optional fields. They can stay empty without any impact on the functionality:

- **Name** &ndash; The name of the codelist. This is the Name used in Parameter1 on worksheet "Definition".

- **Forbidden** (optional) &ndash; define actions you wish to block for the report: **C** (customize), **F** (filter), or **S** (save). 
 You can also combine these restrictions with comma or semicolon. Example: **C,F;S**

- **Description** (optional) &ndash; Additional description to explain the purpose of the report.

- **Sort Column** &ndash; Defines the column by which the report will be sorted. If no prefix is added, the report will be sorted in ascending order. 
 Optionally, you can add a prefix **ascending:** or **descending:** before the attribute.

- **Filter** (optional) &ndash; All attributes, including custom attributes as well as wildcards can be used for filtering.

- **Scope** (optional) &ndash; Defines the scope of P&IDs. Options are **All**, **All Open**, **CurrentDrawing**, and **Selected**.

- **Attributes** &ndash; Attributes to be included in the report. For every additional attribute, add an entry to the first free column to the right. 
The number of attributes to be reported on is not limited.

There are two additional special attributes for reporting: **Color** returns the current color of the object and **Count** gives you the number of objects contained in that object. For instance, a vessel with 4 nozzles will have a count of 5.

### Display styles
#### Color list file
UDiTH uses one central list file (upvcolorindex.txt) for the listing of available Display Styles. This file is located in the **colorfiles** folder of your model's **Data** folder.
It is automatically considered on launch. It contains the names of the color files to be show by default in the **Select display style** selection in the [**File panel**](#files-panel).

#### Color Files
You can create custom color files using Excel for the definition of colors, conditions and color groups.

<img src="./media/IntelliPID3_image173.png" width="600" height="60">

**Color** &ndash; defines colors to colorize the designated items. There are two ways to define a color:
- Use Excel colors in clear name notation: **black, white, red, green, blue, yellow, magenta, and cyan**.
- Use HTML (hexadecimal) color codes starting with \# followed by 6 digits for the basic colors plus two optional digits for opacity: **#RRGGBBOO**. 
Please note that the hexadecimal values range from 00 (decimal 0) to FF (decimal 255).

**Aspect** is an option for 3D coloring and is not used for IntelliPID display styles.

For **Condition** user can enter a filter for any attribute or custom attribute. Wildcards are supported.

**GroupName** is an optional value by which you can define separate color groups in one file. This enables you to define several different conditions without the need to define separate color files.
Conditions belonging to the same color group must have the exact same group name.

**Legend_text** &ndash; defines the descriptive text displayed next to the corresponding color in the legend.

**Legend_display** &ndash; controls whether the legend text is shown or hidden when the legend is displayed.

**Line_Width_Factor** &ndash; modifies the line width of the P&ID objects by a factor. Factor 1 means no change to the line width.

**MarkUp** &ndash; allows line highlighting of the P&ID objects. Transparency is controlled by the last two digits in the “Color” column and the width factor by the digit in the "Line_Width_Factor" column.

### Sketch item index file
To use custom sketching items, a sketch item index file has to be created and named **upvintellipidsketchitemindex.txt**. This file contains the paths to the according custom symbol files you wish to be included in your model.

A catalog item consists of a pair of files: an .svg file that defines the graphics of the symbol itself and a .png file that delivers the symbol preview to be shown in the catalog. A sample IntelliPID Sketch catalog can be downloaded [**here**](https://downloads.caxperts.com/#udith_sampledata). It includes process and signal line symbols, as well as off-page connector symbols.

The .svg custom symbols (Scalable Vector Graphics) can be created using either a variety of desktop software, web-based apps, and code editors or using SmartSketch and converting the .sym symbols using **AdapterForSpid**. 

IntelliPID recognizes the special flags stored in symbol.svg. These flags must be added manually to the SVG code. If converting SmartSketch symbols via AdapterForSpid, the flags can be entered directly into the configuration file.

#### Available parameters 

Svg general specification:

<table>
<tr><th>Flag</th><th>Function</th></tr>
<tr><td>

DrawingFactor="3780"

</td><td>

Fix entry for correct rendering of the symbol in IntelliPID.

</td></tr>
<tr><td>

Inkscape="1.4"

</td><td>

Fix entry for correct rendering of the symbol in IntelliPID.

</td></tr>
<tr><td>

SymbolOriginX="0.5"

</td><td>

Symbol's origin in x-axis. For symmetric symbol "0.5" means the mid-point of the symbols in x-axis.

</td></tr>
<tr><td>

SymbolOriginY="0.5"

</td><td>

Symbol's origin in y-axis. For symmetric symbol "0.5" means the mid-point of the symbols in y-axis.

</td></tr>
<tr><td>

ShowLine="1"

</td><td>

Symbol can be added to the routing without interrupting the line, e.g. insulation symbol.

</td></tr>
<tr><td>

KeepColor="1"

</td><td>

Symbol will keep its original color, independent of the PIDSketch Layer color.

</td></tr>
<tr><td>

Linestyle="1"

</td><td>

This parameter is used to create different routing patterns.

</td></tr>
<tr><td>

DoNotAllowAddObject="1"

</td><td>

This parameter works in conjunction with the "linestyle" flag. It determines whether a symbol can be added to the routing or not.

</td></tr>
<tr><td Colspan=2>

*Parameters for symbols with a leader line:*

</td></tr>
<tr><td>

LeaderX="0.5"

</td><td>

Specifies the relative x-coordinate for start point of leader line vector.

</td></tr>
<tr><td>

LeaderY="0.5" 

</td><td>

Specifies the relative y-coordinate for start point of leader line vector.

</td></tr>
<tr><td>

LeaderVectorX="0.15"

</td><td>

Specifies the relative x-coordinate for end point of initial leader line vector.

</td></tr>
<tr><td>

LeaderVectorY="-0.40"

</td><td>

Specifies the relative y-coordinate for end point of initial leader line vector.

</td></tr>
<tr><td>

LeaderSymbol="Path_to_Symbol"

</td><td>

It creates a combined symbol. It leads to a reference symbol that will be attached to the end of the leader line. For example, in the case of shutdown planning, you would add a mark to the valve together with the description.

</td></tr>
</table>

Parameters on svg path level:
<table>
<tr><th>Flag</th><th>Function</th></tr>
<tr><td>

type ="start"

</td><td>

symbol for the start terminator of the line.

</td></tr>
<tr><td>

type ="end"

</td><td>

symbol for the end terminator of the line.

</td></tr>
<tr><td>

type ="auxiliary"

</td><td>

flag for an auxiliary line (e.g. heat tracing).

</td></tr>
</table>

Parameters on svg text level:
<table>
<tr><th>Flag</th><th>Function</th></tr>
<tr><td>

attribute="Your Text"

</td><td>

It flags text that should be used as an attribute within a custom IntelliPID symbol and made visible on the symbol.

</td></tr>
<tr><td>

attribute="Opc_opctag"

</td><td>

It adds a special tag that can connect existing OPCs and sketch OPCs and make it visible on the symbol. This tag is added automatically when the symbol contains "*opc*" in the name.

</td></tr>
</table>

#### Adding object to the catalogue
You can add any .svg file and a corresponding .png file (optional) to your catalogue. UDiTH will include it on model launch if the object is valid and properly listed with name and path in the file Sketch Item index file. You can use absolute paths, relative paths and include:

- **Absolute path** &ndash; C:\\temp\\Pumps\\pump2.svg

- **Relative Path** &ndash; IntelliPidCatalogue\\Valves\\valve1.svg (relative to the location of your UDiTH model folder)

- **Include** &ndash; #include D:\\yourindex.txt - Include can be used to manage objects for the whole company in as many files as needed, rather than adding single objects to single models. 
In this example yourindex.txt stands for a separate Sketch Item index file.

## Deep linking in IntelliPID
You can include deep links in all types of documents that support links, i.e. Word, websites, email ... 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/11/0/?Equipment%20ITEMTAG=D-240&CMD!Target=IntelliPid&CMD!OpenIntellipidDrawings&CMD!Select&CMD!Fit/

This will look for the Equipment_ITEMTAG D-240, open the according drawing in IntelliPID, select the Item, highlight it and fit it to the screen.

> *There are no error messages for broken links, for example due to a typo. Please use %20 for including space characters*.

**Wildcards:**

- \* = any character

- \_ = any single character

#### Condition operators
By default query conditions are combined with **AND**:

Equipment%20ITEMTAG=K-001&Nozzle Name=N5

**OR** is possible with the combine command:

Equipment%20ITEMTAG=K-001&Equipment%20ITEMTAG=D-100&CMD!Combine=OR