Diagram parsing for data modeling
The features described in this section are currently in beta testing and are only available to selected customers.
Diagram parsing analyzes engineering diagrams to detect symbols and tags and the connections between them. It automatically maps and stores the information to resources in the Cognite Data Fusion (CDF) knowledge graph. As part of the process, you can review and verify the automatic mappings.
Access capabilities
To add the necessary capabilities for diagram parsing workflows, see assign capabilities.
Concepts
Library
A library is a collection of symbols for automatic and manual detection of objects in an engineering diagram. Users create and modify libraries that are available only in their CDF project. The user must specify a library before running a parsing job.
Template
A template is also a collection of symbols. Cognite provides templates, which are available by default for every project. They're read-only but can be cloned as project-specific libraries.
Symbol
A symbol is a blueprint to detect a particular type of equipment, such as a valve, instrument, or pipe. A symbol always exists within a library and contains one or more variants.
Variant
Variant defines one of the many possible geometrical compositions of a symbol. Different SVG paths are used to make a certain symbol, like a valve. Each of the combinations is saved as a variant.
Adding multiple variants to each symbol makes automated detection more accurate by providing the algorithm with more examples. This approach also accounts for situations where a single symbol has multiple visual representations or where minor visual differences exist across different files.
Diagram
A diagram is a single page of a parsed file that contains all the detected symbols, and their connections. Each diagram is created with a particular library.
During the parsing process, the diagram is initially placed in a queue with the in queue status. Once a user picks it up, the status changes to parsing. After the parsing is completed, the status updates to parsed. If an error occurs, the status changes to failed, and the diagram will include a message about the error details.
Run diagram parsing
To parse a diagram:
-
Navigate to CDF > Data management > Contextualize > Diagram parsing.
-
Select the symbol library you want to use to detect symbols in the diagram.
-
Select the file you want to parse, and then select Run parsing.
-
Wait for the parsing to complete, and in the Actions column, select 👁 to view the parsed file.
-
Use the tabs to verify different aspects of the automatic mappings:
-
On the Symbol tab, make sure that the relevant symbols are mapped, and that the mapping is correct:
-
To add newly detected symbols to the library, select the symbol and select which Asset class and Asset type the symbol represents. You can also add the symbol as a variant of an existing symbol.
-
If a symbol maps to the wrong asset, select the symbol and then Detach from symbol.
-
-
On the Mapping tab, map the detected symbols to the correct assets:
-
Select any unmapped symbol, then select Add asset mapping + and choose the asset to map it to.
-
If a symbol is mapped to the wrong asset, select the symbol and select Change mapping.
-
Select 🗑 to remove incorrect mappings.
-
-
On the Connection tab, check that the symbols are correctly connected. You can hover over a symbol to view an entire connection group and select a symbol to view or edit the closest connection.
-
To delete incorrect connections, select .
-
To add any missing connections, select two symbols and then select Create connection.
-
-
-
Rerun the parsing and verify that your changes have been recognized.
Manage symbol libraries
Libraries contain the symbols that diagram parsing uses to detect objects in engineering diagrams. You can create or modify libraries to add new symbols or variants of an existing symbol.
To add a symbol to a library:
-
Navigate to CDF > Data management > Contextualize > Diagram parsing.
-
Select Libraries, and the library you want to add the symbol to. If you don't have a symbol library, create one:
- To make a copy of a library template, select ⋮ > Duplicate template .
- To create a new library, select +.
-
Select Open file and open the file containing the symbol(s) you want to add. We recommend using legend files containing a set of symbols.
-
Select the symbol you want to add. Specify which Asset class (for example, Pump) and Asset type (for example, Centrifugal) the symbol represents.
To add a variant of an existing symbol, select the symbol and Add as variant.