ValveTrack allows users to upload P&IDs as SVG-files. These files can be edited using Inkscape. Draw Freely | Inkscape. This article shows how to edit valves to allow for dynamic colors in ValveTrack.
The following steps are shown in this guide:
Installing Inkscape
Opening P&ID files in Inkscape
Drawing valves
Linking valves to 4insight
Exporting file
Installing Inkscape
Inkscape can be downloaded from this link:
With admin rights:
Without admin rights:
Download this zip-file:
Extract to your preferred location
Go into the extracted folder/inkscape/bin. You can open inkscape with the inkscape.exe
Optional: Make a shortcut to this file to avoid going into the folder each time.
Getting started
The first step is to open the P&ID as an SVG-file, such that the valves can be edited to allow for interactivity. If your P&ID already is an SVG-file, simply open the file with Inkscape. If your P&ID is in another format, e.g. a pdf-file, start Inkscape and click "New Document".
Select "File" -> "Import" and find your P&ID file.
Select either "Internal import" or "Cairo import". Choose desired settings and click "OK"
The P&ID should now be in an SVG-format. The valves must be edited to allow for interactivity using ValveTrack. This can be done by the following steps:
Drawing a valve
The result of this section is a valve template, which can also be downloaded here: Valve template.svg. If the link opens in your browser, right-click the image and choose "Save As" to save the svg file. Open in Inkscape and continue in the next section "Linking valves to 4Insight"
Select the "pen tool" from the menu on the left of the screen.
Use the pen tool to draw a valve by connecting nodes.
Select "Layers and Objects" from the "Layer" tab
The object will be highlighted in the tab to the right when you click on your valve.
Right click your valve and select "Fill and Stroke"
Make sure you can change the fill color by clicking the "Fill" tab and moving the color sliders. The color left in the .svg-file does not matter, as ValveTrack will set the color of the valve dynamically.
Click on the "XML Editor" tab from the drop down menu.
Click "Add a new attribute"
Add the attributes "class" and "valve-id".
Type "valve" under the attribute value for "class". "valve-id" can be left blank for now.
This valve can be copied and pasted and will retain it's attributes.
Linking valves to 4insight
Click on the valve you want to link. Find the XML Editor under the dropdown in the upper right corner.
The group object should be selected.
Make sure "class" is set to "valve".
For "valve-id", paste the id from the ValveTrack valve, and press the "enter" key.
Repeat this process for each valve in your P&ID.
Exporting SVG-file
Select "File"->"Export"
Make sure that the "Document" tab is highlighted, and verify that the entire P&ID can be seen in the preview on the bottom of the page. Select "Inkscape SVG (*.svg)" as the format, and choose a destination to save the file, then click "Export".
FAQ
The P&ID takes too long to load
If the resulting SVG file (P&ID) is large, it will take a long time to load. If the P&ID is above 1.5mb, you could take the following steps to reduce its size:
Delete unnecessary information on the P&ID, e.g. the "Notes" section on the right-hand side.
Use this svg-compressor to reduce the size of the file: https://www.svgminify.com/