Skip to main content
Solved

P&ID convert to SVG, annotations map to the wrong document when multiple files are sent to the API


I’ve encountered a bit of an interesting issue when converting annotated P&IDs to SVG files using this endpoint from the Python SDK:

cognite_client.diagrams.convert(diagram_detect_results)

If I send in one file at a time then it works as expected:

But if I try to upload convert them at the same time then the annotations switch over for some reason. The annotation mapped to file_1 are shown on file_2 and vice versa. This also scales, but is a lot easier to demonstrate with just two files:

 

I’ve attached the diagram detect results that I send in to the API, and I can’t see any reason why this would happen. This makes parallelization somewhat difficult as we need to convert each file individually to ensure correctness.

Attachments:
daigram_res.txt contains both files at once
daigram_res_1.txt and diagram_res_2.txt contains each file as separate entities

Best answer by Que Tran

Hi,

The fix has been deployed :). Thank you again for reporting the issue, Markus!

Best regards,

Que

View original
Did this topic help you find an answer to your question?

2 replies

  • Practitioner
  • 42 replies
  • January 22, 2025

Hi ​@Markus Pettersen ,

Thanks for reporting the issue! It does look like a bug on our end. We’ve passed it along to the team to check out. We will let you know once it’s fixed.

Best regards,
Que


  • Practitioner
  • 42 replies
  • Answer
  • January 23, 2025

Hi,

The fix has been deployed :). Thank you again for reporting the issue, Markus!

Best regards,

Que


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings