Skip to main content

scenarios we are working on, 

  1. To show PI&D diagram with annotations, which help to select the asset and create a threat for that asset.
  2. Or draw a rectangle over the PI&D diagram to select multiple assets. 

For the above two scenarios we are referring APIs in,

 

We are successful in getting the PI&D as image by following the below steps,

1. List Files
https://api.cognitedata.com/api/v1/projects/{project}/files

2. Convert a diagram to image format
https://api.cognitedata.com/api/v1/projects/{project}/context/diagram/convert/

3. Get the results for converting an engineering diagram to an image
https://api.cognitedata.com/api/v1/projects/{project}/context/diagram/convert/{jobId}

 

Could you please guide with APIs / JavaScript SDK methods we need to work on for the above mentioned two scenarios.

 


As the roadmap is subject to be changed and due to some new developments we will have to move this work and create the component in H1 2024. 

 

Thank you,

Andreea.


@Andreea Pastinaru has taken over ownership over this component - can you provide an update?


@Lars Moastuen looking for an update on the component


“We plan to provide a public Javascript component for 2D documents with annotation.We plan to provide a public Javascript component for 2D documents with annotation  “

 

Could you please provide an update if there is any component / library we could start using in our custom applications.


Hi Ibrahim. Thank you for raising this. We plan to provide a public Javascript component for 2D documents with annotation support in Q3-4 2023. This will be a component/library separate from Reveal, but be based on similar ideas. 


Its a custom app that we are building and i was hoping there was something similar to Cognite Reveal for engineering diagrams...is that what the new file viewer is? can we test it in beta


Hi Ibrahim.

Regarding your second second point; if you have access to Cognite Data Fusion, we have multiple apps such as Data Explorer and Interactive Engineering Diagrams where you can visualize and manually create annotations for your files. Currently, only annotations of types diagrams.AssetLink and diagrams.FileLink can be visualized and manually created in those apps. Moreover, annotations in these apps can only be edited and created one at a time.

Hope this helps,

Marvin


Hi!

The way to work with P&IDs going forward is to overlay them with annotations. An annotation denotes a region in a file and can link to e.g. assets. You can see documentation here: 
https://docs.cognite.com/api/v1/#tag/Annotations

The convert to image flow will be deprecated. https://docs.cognite.com/api/v1/#tag/Engineering-diagrams/operation/diagramDetect is the easiest way to detect references to assets, but the output should be written to the annotations API.

The overlaying of annotations is handled by a unified file viewer component which is being rolled out to relevant applications. I am not sure which application is most ideal for the mentioned use cases, or if creating a custom app is the intention, but it should anyway be based on annotations.

Hope that helps!


Reply