hediet / vscode-drawio

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
GNU General Public License v3.0
9.02k stars 406 forks source link

Import Library from app.diagrams.net #424

Open om0wt opened 2 months ago

om0wt commented 2 months ago

I have created a new library in app.diagrams.net and exported it as .xml. All library items are in this xml. Is it possible to import such a library among existing shapes?

image

I made a test:

  1. I created a new directory netapp in .vscode/extensions/hediet.vscode-drawio-1.6.6/drawio/src/main/webapp/templates and copied exported library (from app.diagrams.net) netapp.xml into it:
➜  templates find netapp
netapp
netapp/netapp.xml
➜  templates pwd
/Users/<user>/.vscode/extensions/hediet.vscode-drawio-1.6.6/drawio/src/main/webapp/templates
➜  templates
  1. I added a new entry into index.xml:
➜  templates grep netapp index.xml
<template url="network/netapp.xml" name="NetApp" libs="general;netapp" tags="NetApp"/>

Restarted VSC, but the library doesn't appear among other Shapes...

What do I need to do in order to import it correctly?

Thanks.

Pavol