> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create interactive diagrams

> Extract information from static engineering diagrams to create interactive diagrams that you can explore on any device.

Use this contextualization tool to find, extract, and match tags on engineering diagrams and link them to an asset hierarchy or other resource types, such as files. You can approve or reject the results at any time.

An engineering diagram with new tags has the status **Pending approval**. This status means that there are detected tags that need to be either approved or rejected to ensure that the interactive diagrams are accurate.

For each engineering diagram, CDF shows the tag types it has detected:

* Tag type **Diagrams**: Tags to other engineering diagrams.
* Tag type **Assets**: Tags to other assets in CDF.
* Tag type **Unlinked**: Tags that are already manually linked to other resources.

## Create interactive diagrams

<Steps>
  <Step title="Navigate to diagram parsing">
    Navigate to **Data fusion** > **Contextualize** > **Diagram parsing**.
  </Step>

  <Step title="Create interactive diagrams">
    Select **Create interactive diagrams**.
  </Step>

  <Step title="Select diagrams">
    Select the diagrams that you want to make interactive.

    You can filter the diagrams by **Name**, **Data set**, **Label**, or **File type**, such as PDF. For assets, you can also filter by **Root asset**.

    <Tip>
      The supported interactive diagram file mime\_types are application/pdf, image/jpeg, image/png, and image/tiff. For more information, see [API documentation for engineering diagrams](/api-reference/concepts/20230101/engineering-diagrams).
    </Tip>
  </Step>

  <Step title="Continue to next step">
    Select **Next step** to continue.
  </Step>

  <Step title="Optional. Link to other diagrams">
    Select the diagrams you want to link your diagrams to and select **Next step**.
  </Step>

  <Step title="Link to assets">
    Select the assets you want to link your diagrams to and select **Next step**. This limits the matching to assets from the same plant or unit as the selected diagrams.
  </Step>

  <Step title="Select contextualization model">
    Select a contextualization model:

    <Frame>
      <img src="https://apps-cdn.cogniteapp.com/@cognite/docs-portal-images/1.0.0/images/cdf/integrations/contextualization/select_model.png" alt="Select model interface showing Standard and Advanced model options" width="80%" />
    </Frame>

    * The **Standard model** is selected by default as this model is recommended for most engineering diagrams.
    * The **Advanced model** lets you configure options such as the number of tokens matched for an entity, partial matches, and field matching.
  </Step>

  <Step title="Continue and run model">
    Select **Next step**.

    <Tip>
      Activate **Save and skip settings** if you always use the same model.
    </Tip>

    Select **Run model**.
  </Step>

  <Step title="Review and approve results">
    Review the result of the model - newly detected tags on the interactive diagrams.

    Select **Approve all**, **Preview all**, or select a diagram to review it individually.

    <Frame>
      <img src="https://apps-cdn.cogniteapp.com/@cognite/docs-portal-images/1.0.0/images/cdf/integrations/contextualization/interactive_view.png" alt="Interactive diagram view showing detected tags and approval options" width="80%" />
    </Frame>
  </Step>
</Steps>

### Approve or reject detected tags

<Steps>
  <Step title="Select detected tag">
    Select the bounding box around the detected tag in the diagram.
  </Step>

  <Step title="Approve or reject">
    Select **Approve tag** or **Reject tag**.
  </Step>

  <Step title="Save changes">
    Select **Save**.

    <Frame>
      <img src="https://apps-cdn.cogniteapp.com/@cognite/docs-portal-images/1.0.0/images/cdf/integrations/contextualization/bounding_box.png" alt="Bounding box highlighting a detected tag on the diagram" width="70%" />
    </Frame>
  </Step>
</Steps>

You can also approve or reject tags like this:

<Steps>
  <Step title="Select diagram">
    Select a diagram to review it individually.
  </Step>

  <Step title="Select tag type">
    If the diagram has tags, select **Asset** or **Diagram** on the right sidebar to review them.
  </Step>

  <Step title="Select pending tag">
    Select the pending tag - outlined in blue.
  </Step>

  <Step title="Select specific tag">
    Select the tag you want to review.
  </Step>

  <Step title="Approve or reject">
    Select **Approve tag** or **Reject tag**.
  </Step>

  <Step title="Save changes">
    Select **Save**.
  </Step>
</Steps>

### Add new tags

<Steps>
  <Step title="Open edit mode">
    Select the pencil icon to open edit mode.
  </Step>

  <Step title="Draw bounding box">
    Use the mouse pointer to draw a bounding box around the tag you want to add.
  </Step>

  <Step title="Link to CDF resource">
    Select **Add manually** and select the CDF resource in the list you want to link to.
  </Step>

  <Step title="Save the tag">
    Select **Save**.
  </Step>
</Steps>

## Review engineering diagrams pending approval

You can filter the diagrams that are pending approval by **Name**, **Data set**, or **File type**.

<Steps>
  <Step title="Open diagram options">
    Select the **More options** icon on the diagram.
  </Step>

  <Step title="Choose action">
    Select **Recontextualize diagram**, **Approve pending tags**, **Reject pending tags**, or **Clear all tags** on the diagram. If you select **Recontextualize diagram**, you restart the process.
  </Step>
</Steps>

## Save diagrams as SVG

<Steps>
  <Step title="Open save options">
    Select **More options** icon or select **Save as SVG** button.
  </Step>

  <Step title="Configure file names">
    You can save the files as SVG with the same names or specify a prefix.
  </Step>

  <Step title="Save the files">
    Select **Save files**.
  </Step>
</Steps>

For information about the new diagram parsing, an upgrade from asset-centric to a data-model approach, see [Diagram parsing for data modeling](/cdf/integration/guides/contextualization/diagram_parsing).
